diff --git a/pom.xml b/pom.xml
index d5cd6332..226ddf26 100644
--- a/pom.xml
+++ b/pom.xml
@@ -86,9 +86,7 @@
- target/output-files
-
-
+ target
@@ -146,6 +144,8 @@
${doClean} install
${project.name}-${project.version}${branch}${commit}${fileTimeStamp}${build}
+ ${outputDir}/PreShade/
+
src/main/java
@@ -168,7 +168,7 @@
org.apache.maven.plugins
maven-compiler-plugin
- 3.8.1
+ 3.12.1
1.8
@@ -181,15 +181,14 @@
true
false
- ${outputDir}/shade
- target/server/plugins/${build.finalName}.jar
-
+ ${outputDir}/server/plugins/${project.build.finalName}.jar
org.bstats:*
de.themoep:*
com.bergerkiller.bukkit:*
com.github.simplix-softworks:*
+ de.leonhart:*
@@ -206,13 +205,14 @@
*:*
- META-INF/maven/**
+ META-INF/**
+ shade
package
shade
@@ -220,6 +220,28 @@
+
+ com.coderplus.maven.plugins
+ copy-rename-maven-plugin
+ 1.0
+
+
+
+ ${outputDir}/server/plugins/${project.build.finalName}.jar
+ ${outputDir}/${project.build.finalName}.jar
+
+
+
+
+
+ copy
+ install
+
+ copy
+
+
+
+
org.apache.maven.plugins
maven-javadoc-plugin
@@ -227,7 +249,7 @@
${project.build.finalName}
false
- ${outputDir}/JavaDocs
+ ${outputDir}
${skipDocs}
@@ -287,7 +309,7 @@
org.spigotmc
spigot-api
- 1.20-R0.1-SNAPSHOT
+ 1.21.1-R0.1-SNAPSHOT
provided
@@ -334,7 +356,7 @@
org.projectlombok
lombok
- 1.18.26
+ 1.18.30
provided
diff --git a/src/main/java/org/shanerx/tradeshop/TradeShop.java b/src/main/java/org/shanerx/tradeshop/TradeShop.java
index 4beb77ec..bc9d4e6c 100644
--- a/src/main/java/org/shanerx/tradeshop/TradeShop.java
+++ b/src/main/java/org/shanerx/tradeshop/TradeShop.java
@@ -140,12 +140,6 @@ private boolean loadChecks() {
getSettingManager().reload();
getMessageManager().reload();
- String lockout = "§a§3§c§2§f§6";
- if (Setting.MESSAGE_PREFIX.getString().startsWith(lockout)) { //TODO remove for release if old data will not be lost
- getLogger().log(Level.SEVERE, "This version will most likely break existing data. To continue, please add `" + lockout + "` before the message prefix in the config and restart the server.");
- return false;
- }
-
return getVarManager().getDataStorage() != null;
}
diff --git a/src/main/java/org/shanerx/tradeshop/data/storage/DataStorage.java b/src/main/java/org/shanerx/tradeshop/data/storage/DataStorage.java
index 50441db1..bfb5cb9f 100644
--- a/src/main/java/org/shanerx/tradeshop/data/storage/DataStorage.java
+++ b/src/main/java/org/shanerx/tradeshop/data/storage/DataStorage.java
@@ -318,10 +318,12 @@ protected LinkageConfiguration getLinkageData(World w) {
public void ensureFinalSave() {
// for onDisable !!!
+ /* WILL BE ADDED BACK IN LATER
if (dataType == DataType.FLATFILE) {
JsonShopData.SaveThreadMaster.getInstance().saveEverythingNow();
}
// SQLITE will have an analogous branch
+ */
}
}
diff --git a/src/main/java/org/shanerx/tradeshop/data/storage/Json/JsonShopData.java b/src/main/java/org/shanerx/tradeshop/data/storage/Json/JsonShopData.java
index d13fb883..4419ec12 100644
--- a/src/main/java/org/shanerx/tradeshop/data/storage/Json/JsonShopData.java
+++ b/src/main/java/org/shanerx/tradeshop/data/storage/Json/JsonShopData.java
@@ -29,7 +29,6 @@
import org.bukkit.scheduler.BukkitRunnable;
import org.jetbrains.annotations.NotNull;
import org.shanerx.tradeshop.TradeShop;
-import org.shanerx.tradeshop.data.config.Setting;
import org.shanerx.tradeshop.data.storage.ShopConfiguration;
import org.shanerx.tradeshop.shop.Shop;
import org.shanerx.tradeshop.shoplocation.ShopChunk;
@@ -45,6 +44,7 @@
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentSkipListSet;
+import org.shanerx.tradeshop.data.config.Setting;
public class JsonShopData extends JsonConfiguration implements ShopConfiguration {
@@ -105,7 +105,23 @@ public int size() {
@Override
protected void saveFile() {
- SaveThreadMaster.getInstance().enqueue(this);
+ if (super.keySet().isEmpty()) {
+ super.file.delete();
+ } else {
+ super.saveFile();
+ }
+
+ /*
+ //SaveThreadMaster.getInstance().enqueue(this);
+
+ File file = op.jsonConfig.getFile();
+ if (op.jsonConfig.keySet().isEmpty()) {
+ file.delete();
+ } else {
+ op.jsonConfig.saveFile();
+ }
+ */
+
}
@Override
@@ -131,6 +147,7 @@ protected void loadFile() {
}
}
+ /*
public static class SaveOperation implements Comparable {
@Getter
@@ -259,4 +276,5 @@ public int hashCode() {
return master.maxThreads == 0 ? 0 : super.getTaskId();
}
}
+*/
}