diff options
Diffstat (limited to 'src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java')
-rw-r--r-- | src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java b/src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java index 2fef77c..0a81793 100644 --- a/src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java +++ b/src/main/java/net/tylermurphy/hideAndSeek/command/Stop.java @@ -2,26 +2,25 @@ package net.tylermurphy.hideAndSeek.command; import static net.tylermurphy.hideAndSeek.configuration.Config.*; -import net.tylermurphy.hideAndSeek.game.Status; -import net.tylermurphy.hideAndSeek.game.WinType; +import net.tylermurphy.hideAndSeek.game.Game; +import net.tylermurphy.hideAndSeek.util.Status; +import net.tylermurphy.hideAndSeek.util.WinType; import org.bukkit.Bukkit; import org.bukkit.command.CommandSender; -import net.tylermurphy.hideAndSeek.Main; -import net.tylermurphy.hideAndSeek.util.Util; import static net.tylermurphy.hideAndSeek.configuration.Localization.*; public class Stop implements ICommand { public void execute(CommandSender sender, String[] args) { - if(!Util.isSetup()) { + if(Game.isNotSetup()) { sender.sendMessage(errorPrefix + "Game is not setup. Run /hs setup to see what you needed to do"); return; } - if(Main.plugin.status == Status.STARTING || Main.plugin.status == Status.PLAYING) { + if(Game.status == Status.STARTING || Game.status == Status.PLAYING) { if(announceMessagesToNonPlayers) Bukkit.broadcastMessage(abortPrefix + message("STOP")); - else Util.broadcastMessage(abortPrefix + message("STOP")); - Main.plugin.game.stop(WinType.NONE); + else Game.broadcastMessage(abortPrefix + message("STOP")); + Game.stop(WinType.NONE); } else { sender.sendMessage(errorPrefix + message("GAME_NOT_INPROGRESS")); } |