mirror of
https://github.com/EarthMC/QuickShop-Reremake.git
synced 2026-11-25 01:49:49 -05:00
Merge branch 'master' of github.com:Ghost-chu/QuickShop-Reremake
Former-commit-id: 55d34f62e0a8df1f339923d9c188f39bc5f9a2d9
This commit is contained in:
commit
9d0775cdcf
4 files changed
+12
-20
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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"))));
|
||||
|
||||
Reference in new issue
Block a user