From bb254145ed0bb56d0482f6ba34e05cb728a7c8cc Mon Sep 17 00:00:00 2001 From: tylermurphy534 Date: Wed, 2 Nov 2022 07:18:00 -0400 Subject: 1.7.0 beta 2 --- .../net/tylermurphy/hideAndSeek/command/Reload.java | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java') 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")); } -- cgit v1.2.3-freya