From 80a95b5c3d92981c00c8164739b66577d9ec7bca Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 22 Jan 2015 16:44:20 -0800 Subject: [PATCH] translations really need to be fixed. --- .../main/java/com/intellectualcrafters/plot/PlotMain.java | 2 +- .../java/com/intellectualcrafters/plot/commands/Reload.java | 4 ++-- .../main/java/com/intellectualcrafters/plot/config/C.java | 6 ++---- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java index 0c778ffe3..95d6179e8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/PlotMain.java @@ -802,7 +802,7 @@ public class PlotMain extends JavaPlugin implements Listener { /** * SETUP: settings.yml */ - private static void setupConfig() { + public static void setupConfig() { final int config_ver = 1; config.set("version", config_ver); final Map options = new HashMap<>(); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java index b8da135a0..023e072c1 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/commands/Reload.java @@ -37,11 +37,11 @@ public class Reload extends SubCommand { @Override public boolean execute(final Player plr, final String... args) { try { - PlotMain.reloadTranslations(); - // The following won't affect world generation, as that has to be // loaded during startup unfortunately. PlotMain.config.load(PlotMain.configFile); + PlotMain.setupConfig(); + C.setupTranslations(); for (final String pw : PlotMain.getPlotWorlds()) { final PlotWorld plotworld = PlotMain.getWorldSettings(pw); plotworld.loadDefaultConfiguration(PlotMain.config.getConfigurationSection("worlds." + pw)); diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java index ee4fca7e4..69ad6f246 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/config/C.java @@ -139,8 +139,8 @@ public enum C { /* * Reload */ - RELOADED_CONFIGS("&6The translation files has been reloaded"), - RELOAD_FAILED("&cFailed to reload the translations file"), + RELOADED_CONFIGS("&6Translations and world settings have been reloaded"), + RELOAD_FAILED("&cFailed to reload file configurations"), /* * BarAPI */ @@ -440,7 +440,6 @@ public enum C { /** * Constructor for custom strings. */ - @SuppressWarnings("unused") C() { /* * use setCustomString(); @@ -481,7 +480,6 @@ public enum C { * * @return default */ - @SuppressWarnings("unused") public String d() { return this.d; }