From 2971761a5e7fb5d118e8b82218a08679ea9302a1 Mon Sep 17 00:00:00 2001 From: libraryaddict Date: Tue, 9 Jun 2015 22:19:03 +1200 Subject: [PATCH] Game stop command: Move unregister of game listener after the gamestate has been changed --- .../src/nautilus/game/arcade/command/StopCommand.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java index 13fa1b5f5..2f09c66bf 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/command/StopCommand.java @@ -22,8 +22,6 @@ public class StopCommand extends CommandBase if (Plugin.GetGame() == null) return; - HandlerList.unregisterAll(Plugin.GetGame()); - if (Plugin.GetGame().GetState() == GameState.End || Plugin.GetGame().GetState() == GameState.End) { caller.sendMessage("Game is already ending..."); @@ -38,6 +36,7 @@ public class StopCommand extends CommandBase Plugin.GetGame().SetState(GameState.End); } + HandlerList.unregisterAll(Plugin.GetGame()); Plugin.GetGame().Announce(C.cAqua + C.Bold + caller.getName() + " has stopped the game."); }