From 10911c9a9c9a5d519c5d8fdbc1910328a5e37e9c Mon Sep 17 00:00:00 2001 From: Shaun Bennett Date: Thu, 17 Nov 2016 16:17:39 -0500 Subject: [PATCH] Revert CTF Proxy Fix --- .../nautilus/game/arcade/ArcadeManager.java | 48 +++++++++---------- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 4c4272685..7f06f6036 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -188,7 +188,6 @@ public class ArcadeManager extends MiniPlugin implements IRelation //Champions Modules private boolean _enabled = true; - private Boolean _registered = null; private ClassManager _classManager; private SkillFactory _skillFactory; private ItemFactory _itemFactory; @@ -1708,43 +1707,40 @@ public class ArcadeManager extends MiniPlugin implements IRelation public void enableChampionsModules() { - if (_registered == null || !_registered) - { - _classManager.setEnabled(true); - _classShopManager.registerSelf(); - _skillFactory.registerSelf(); - _itemFactory.registerSelf(); - _energy.registerSelf(); - _eloManager.registerSelf(); + _classManager.setEnabled(true); + _classShopManager.registerSelf(); + _skillFactory.registerSelf(); + _itemFactory.registerSelf(); + _energy.registerSelf(); + _eloManager.registerSelf(); - //Class Shop - _plugin.getServer().getPluginManager().registerEvents(_classShop, _plugin); - - _registered = true; - } + //Class Shop + _plugin.getServer().getPluginManager().registerEvents(_classShop, _plugin); } public void disableChampionsModules() { - if (_registered != null && _registered) - { - _classManager.setEnabled(false); - _classShopManager.deregisterSelf(); - _skillFactory.deregisterSelf(); - _itemFactory.deregisterSelf(); - _energy.deregisterSelf(); - _eloManager.deregisterSelf(); + _classManager.setEnabled(false); + _classShopManager.deregisterSelf(); + _skillFactory.deregisterSelf(); + _itemFactory.deregisterSelf(); + _energy.deregisterSelf(); + _eloManager.deregisterSelf(); - //Class Shop - HandlerList.unregisterAll(_classShop); - _registered = false; - } + //Class Shop + HandlerList.unregisterAll(_classShop); } public void toggleChampionsModules(GameType gameType) { boolean isChamps = gameType == GameType.ChampionsDominate || gameType == GameType.ChampionsTDM || gameType == GameType.ChampionsCTF || gameType == GameType.BossBattles; + if (_enabled == isChamps) + { + System.out.println("----------Champions Modules are still " + isChamps); + return; + } + System.out.println("----------Champions Modules set to " + isChamps); _enabled = isChamps;