From 8f0a3ef68c4298ed3c79b4fc717f2fdc3d2cda7b Mon Sep 17 00:00:00 2001 From: Tyler Murphy Date: Wed, 18 Aug 2021 19:21:59 -0400 Subject: glow powerup --- src/main/java/net/tylermurphy/hideAndSeek/commands/Stop.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/main/java/net/tylermurphy/hideAndSeek/commands/Stop.java') diff --git a/src/main/java/net/tylermurphy/hideAndSeek/commands/Stop.java b/src/main/java/net/tylermurphy/hideAndSeek/commands/Stop.java index b4ccca4..71d0035 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/commands/Stop.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/commands/Stop.java @@ -17,7 +17,8 @@ public class Stop implements ICommand { public void execute(CommandSender sender, String[] args) { if(status.equals("Starting") || status.equals("Playing")) { - onStop(true); + Bukkit.broadcastMessage(messagePrefix + "Game has been force stopped."); + onStop(); } else { sender.sendMessage(errorPrefix + "There is no game in progress"); @@ -29,15 +30,9 @@ public class Stop implements ICommand { return "stop"; } - public static void onStop(boolean forced) { + public static void onStop() { if(status.equals("Standby") || status.equals("Setup")) return; - if(forced) { - Bukkit.broadcastMessage(messagePrefix + "Game has been force stopped."); - } else { - Bukkit.broadcastMessage(messagePrefix + "Game over! All hiders have been found."); - } status = "Standby"; - Bukkit.getServer().getScheduler().cancelTask(startTaskId); for(Player player : playerList.values()) { player.setGameMode(GameMode.ADVENTURE); Hider.addEntry(player.getName()); -- cgit v1.2.3-freya