From 9257ea1bdba46869d2ee5fb367867f59b837e409 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Mon, 6 Jul 2020 23:33:45 -0500 Subject: [PATCH] Add message for when config is reloaded --- .../energeticstorage/commands/ESReloadCommand.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/seanomik/energeticstorage/commands/ESReloadCommand.java b/src/main/java/net/seanomik/energeticstorage/commands/ESReloadCommand.java index f3221fb..3438c4a 100644 --- a/src/main/java/net/seanomik/energeticstorage/commands/ESReloadCommand.java +++ b/src/main/java/net/seanomik/energeticstorage/commands/ESReloadCommand.java @@ -23,8 +23,14 @@ public class ESReloadCommand implements CommandExecutor { ConfigFile.getConfig().reloadConfig(); PlayersFile.getConfig().reloadConfig(); - // Recache the systems - Reference.ES_SYSTEMS = PlayersFile.getAllSystems(); + // Re-cache the systems + try { + Reference.ES_SYSTEMS = PlayersFile.getAllSystems(); + sender.sendMessage(Reference.PREFIX + ChatColor.GREEN + "Reloaded!"); + } catch (Exception e) { + e.printStackTrace(); + sender.sendMessage(Reference.PREFIX + ChatColor.RED + "Failed to Reload!"); + } return true; }