From f1379a94754b68cc3904d2b96b5815854d5565c1 Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Tue, 31 Aug 2021 21:55:27 -0400 Subject: 1.3.0 beta 5 --- .../tylermurphy/hideAndSeek/command/Reload.java | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java (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 new file mode 100644 index 0000000..1b1f1d5 --- /dev/null +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Reload.java @@ -0,0 +1,33 @@ +package net.tylermurphy.hideAndSeek.command; + +import org.bukkit.command.CommandSender; + +import net.tylermurphy.hideAndSeek.Store; +import net.tylermurphy.hideAndSeek.util.Functions; +import net.tylermurphy.hideAndSeek.util.ICommand; + +import static net.tylermurphy.hideAndSeek.Store.*; + +public class Reload implements ICommand { + + public void execute(CommandSender sender, String[] args) { + Store.loadConfig(); + try { + Functions.loadScoreboard(); + } catch(Exception e) {} + sender.sendMessage(messagePrefix + "Reloaded the config"); + } + + public String getLabel() { + return "reload"; + } + + public String getUsage() { + return ""; + } + + public String getDescription() { + return "Reloads the config"; + } + +} -- cgit v1.2.3-freya