diff --git a/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRepository.java index 37fbeb41d..c40eb8fb6 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/powerplayclub/PowerPlayClubRepository.java @@ -39,8 +39,6 @@ public class PowerPlayClubRepository implements Listener { // giving a player his/her rewards. private final Map _cachedPlayerData = new HashMap<>(); - private final Set _yearlySubscriptions = new HashSet<>(); - private final CoreClientManager _clientManager; private final DonationManager _donationManager; @@ -86,10 +84,6 @@ public class PowerPlayClubRepository implements Listener { LocalDate date = resultSet.getDate("startDate").toLocalDate(); PowerPlayData.SubscriptionDuration duration = PowerPlayData.SubscriptionDuration.valueOf(resultSet.getString("duration").toUpperCase()); subscriptions.add(new PowerPlayData.Subscription(date, duration)); - if (duration.equals(PowerPlayData.SubscriptionDuration.YEAR)) - { - _yearlySubscriptions.add(uuid); - } } // Now that we have the claims from the first processor and subscriptions from this one, combine them @@ -115,7 +109,10 @@ public class PowerPlayClubRepository implements Listener { .forEach(_donationManager.Get(player)::AddUnknownSalesPackagesOwned); // Gives Metal Man for anyone subscribed - _donationManager.Get(player).AddUnknownSalesPackagesOwned("Metal Man Morph"); + if (cached.getUsableCosmeticMonths().size() > 0) + { + _donationManager.Get(player).AddUnknownSalesPackagesOwned("Metal Man Morph"); + } } @EventHandler @@ -123,7 +120,6 @@ public class PowerPlayClubRepository implements Listener { { _stageOneDataClaims.remove(event.getPlayer().getUniqueId()); // Just in case. _cachedPlayerData.remove(event.getPlayer().getUniqueId()); - _yearlySubscriptions.remove(event.getPlayer().getUniqueId()); } public CompletableFuture addSubscription(int accountId, LocalDate date, String duration) 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 b0298e685..86fa666a6 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -185,8 +185,8 @@ public class ArcadeManager extends MiniPlugin implements IRelation private ArcadeShop _arcadeShop; //Champions Modules - private boolean _enabled = false; private Boolean _registered = null; + private boolean _enabled = true; private ClassManager _classManager; private SkillFactory _skillFactory; private ItemFactory _itemFactory; @@ -1697,43 +1697,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;