diff --git a/pom.xml b/pom.xml
index 7deac991d..5ad44c52a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.maxgamer
QuickShop
- 3.1.3
+ 3.1.3.1
@@ -61,13 +61,6 @@
-
-
- me.lucko.commodore
-
- org.maxgamer.quickshop.commodore
-
-
@@ -354,12 +347,6 @@
1.6.9.5-U0.5.7
provided
-
- me.lucko
- commodore
- 1.3
- compile
-
jline
jline
diff --git a/src/main/java/org/maxgamer/quickshop/Command/CommandManager.java b/src/main/java/org/maxgamer/quickshop/Command/CommandManager.java
index d3561041b..388d30034 100644
--- a/src/main/java/org/maxgamer/quickshop/Command/CommandManager.java
+++ b/src/main/java/org/maxgamer/quickshop/Command/CommandManager.java
@@ -356,6 +356,9 @@ public class CommandManager implements TabCompleter, CommandExecutor {
@NotNull String commandLabel,
@NotNull String[] cmdArg) {
// No args, it shouldn't happend
+ if (QuickShop.instance.getBootError() != null) {
+ return null;
+ }
if (sender instanceof Player) {
if (QuickShop.instance.getConfig().getBoolean("effect.sound.ontabcomplete")) {
Player player = (Player) sender;
diff --git a/src/main/java/org/maxgamer/quickshop/Util/MojangAPI/AssetJson.java b/src/main/java/org/maxgamer/quickshop/Util/MojangAPI/AssetJson.java
index 4edc040ef..26736bd53 100644
--- a/src/main/java/org/maxgamer/quickshop/Util/MojangAPI/AssetJson.java
+++ b/src/main/java/org/maxgamer/quickshop/Util/MojangAPI/AssetJson.java
@@ -38,6 +38,7 @@ public class AssetJson {
@Nullable
public String getLanguageHash(@NotNull String languageCode) {
+ languageCode = languageCode.replace("-","_").toLowerCase().trim();
JsonObject json = new JsonParser().parse(this.gameAssets).getAsJsonObject();
if (json == null || json.isJsonNull()) {
Util.debugLog("Cannot parse the json: " + this.gameAssets);
@@ -56,6 +57,7 @@ public class AssetJson {
JsonObject langObj = objs.getAsJsonObject(MsgUtil.fillArgs(pathTemplate, languageCode));
if (langObj == null || langObj.isJsonNull()) {
Util.debugLog("Cannot find request path.");
+ Util.debugLog(this.gameAssets);
return null;
}
JsonPrimitive hashObj = langObj.getAsJsonPrimitive("hash");
diff --git a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java
index 733ddfa84..994683b42 100644
--- a/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java
+++ b/src/main/java/org/maxgamer/quickshop/Util/MsgUtil.java
@@ -364,11 +364,11 @@ public class MsgUtil {
File enchi18nFile = new File(plugin.getDataFolder(), "enchi18n.yml");
if (!enchi18nFile.exists()) {
plugin.getLogger().info("Creating enchi18n.yml");
- plugin.saveResource("enchi18n.yml", true);
+ plugin.saveResource("enchi18n.yml", false);
}
// Store it
enchi18n = YamlConfiguration.loadConfiguration(enchi18nFile);
- enchi18n.options().copyDefaults(true);
+ enchi18n.options().copyDefaults(false);
YamlConfiguration enchi18nYAML =
YamlConfiguration.loadConfiguration(
new InputStreamReader(Objects.requireNonNull(plugin.getResource("enchi18n.yml"))));
@@ -402,11 +402,11 @@ public class MsgUtil {
File itemi18nFile = new File(plugin.getDataFolder(), "itemi18n.yml");
if (!itemi18nFile.exists()) {
plugin.getLogger().info("Creating itemi18n.yml");
- plugin.saveResource("itemi18n.yml", true);
+ plugin.saveResource("itemi18n.yml", false);
}
// Store it
itemi18n = YamlConfiguration.loadConfiguration(itemi18nFile);
- itemi18n.options().copyDefaults(true);
+ itemi18n.options().copyDefaults(false);
YamlConfiguration itemi18nYAML =
YamlConfiguration.loadConfiguration(
new InputStreamReader(Objects.requireNonNull(plugin.getResource("itemi18n.yml"))));
@@ -442,11 +442,11 @@ public class MsgUtil {
File potioni18nFile = new File(plugin.getDataFolder(), "potioni18n.yml");
if (!potioni18nFile.exists()) {
plugin.getLogger().info("Creating potioni18n.yml");
- plugin.saveResource("potioni18n.yml", true);
+ plugin.saveResource("potioni18n.yml", false);
}
// Store it
potioni18n = YamlConfiguration.loadConfiguration(potioni18nFile);
- potioni18n.options().copyDefaults(true);
+ potioni18n.options().copyDefaults(false);
YamlConfiguration potioni18nYAML =
YamlConfiguration.loadConfiguration(
new InputStreamReader(Objects.requireNonNull(plugin.getResource("potioni18n.yml"))));