summaryrefslogtreewikicommitdiff
path: root/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java')
-rw-r--r--src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java b/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java
index 51bc509..9f8392f 100644
--- a/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java
+++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java
@@ -21,10 +21,7 @@ package net.tylermurphy.hideAndSeek.command;
import net.tylermurphy.hideAndSeek.Main;
import net.tylermurphy.hideAndSeek.command.util.Command;
-import net.tylermurphy.hideAndSeek.configuration.Config;
-import net.tylermurphy.hideAndSeek.configuration.Items;
-import net.tylermurphy.hideAndSeek.configuration.Localization;
-import net.tylermurphy.hideAndSeek.configuration.Maps;
+import net.tylermurphy.hideAndSeek.configuration.*;
import net.tylermurphy.hideAndSeek.game.util.Status;
import org.bukkit.entity.Player;
@@ -42,10 +39,18 @@ public class Reload extends Command {
sender.sendMessage(errorPrefix + message("GAME_INPROGRESS"));
return;
}
- Config.loadConfig();
- Maps.loadMaps();
- Localization.loadLocalization();
- Items.loadItems();
+
+ try {
+ Config.loadConfig();
+ Maps.loadMaps();
+ Localization.loadLocalization();
+ Items.loadItems();
+ Leaderboard.loadLeaderboard();
+ } catch (Exception e) {
+ sender.sendMessage(errorPrefix + message("CONFIG_ERROR"));
+ return;
+ }
+
sender.sendMessage(messagePrefix + message("CONFIG_RELOAD"));
}