diff --git a/Plugins/Mineplex.Core/src/mineplex/core/beta/BetaWhitelist.java b/Plugins/Mineplex.Core/src/mineplex/core/beta/BetaWhitelist.java index 6c47fa235..7e1a30617 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/beta/BetaWhitelist.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/beta/BetaWhitelist.java @@ -12,7 +12,6 @@ import com.google.common.collect.ImmutableSet; import mineplex.core.MiniPlugin; import mineplex.core.account.CoreClientManager; -import mineplex.core.bonuses.BonusManager; import mineplex.core.common.Rank; import mineplex.core.powerplayclub.PowerPlayClubRepository; @@ -44,11 +43,11 @@ public class BetaWhitelist extends MiniPlugin private final CoreClientManager _clientManager; private final PowerPlayClubRepository _powerPlayClubRepository; - public BetaWhitelist(BonusManager manager) + public BetaWhitelist(CoreClientManager clientManager, PowerPlayClubRepository powerPlayRepository) { super("Beta Whitelist"); - _clientManager = manager.getClientManager(); - _powerPlayClubRepository = manager.getPowerPlayClubRepository(); + _clientManager = clientManager; + _powerPlayClubRepository = powerPlayRepository; } @EventHandler diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java index e7c6a9b37..9bd47124d 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/GemHunters.java @@ -1,6 +1,6 @@ package mineplex.gemhunters; -import static mineplex.core.Managers.require; +import net.minecraft.server.v1_8_R3.MinecraftServer; import org.bukkit.World; import org.bukkit.craftbukkit.v1_8_R3.CraftWorld; @@ -12,6 +12,7 @@ import mineplex.core.FoodDupeFix; import mineplex.core.TimingsFix; import mineplex.core.account.CoreClientManager; import mineplex.core.achievement.AchievementManager; +import mineplex.core.beta.BetaWhitelist; import mineplex.core.blockrestore.BlockRestore; import mineplex.core.boosters.BoosterManager; import mineplex.core.chat.Chat; @@ -44,6 +45,7 @@ import mineplex.core.packethandler.PacketHandler; import mineplex.core.party.PartyManager; import mineplex.core.pet.PetManager; import mineplex.core.portal.Portal; +import mineplex.core.powerplayclub.PowerPlayClubRepository; import mineplex.core.preferences.PreferencesManager; import mineplex.core.projectile.ProjectileManager; import mineplex.core.punish.Punish; @@ -61,7 +63,6 @@ import mineplex.gemhunters.bounties.BountyModule; import mineplex.gemhunters.chat.ChatModule; import mineplex.gemhunters.death.DeathModule; import mineplex.gemhunters.death.npc.NPCManager; -import mineplex.gemhunters.debug.DebugModule; import mineplex.gemhunters.economy.CashOutModule; import mineplex.gemhunters.economy.EconomyModule; import mineplex.gemhunters.loot.InventoryModule; @@ -81,7 +82,8 @@ import mineplex.gemhunters.worldevent.WorldEventModule; import mineplex.minecraft.game.core.combat.CombatManager; import mineplex.minecraft.game.core.condition.ConditionManager; import mineplex.minecraft.game.core.damage.DamageManager; -import net.minecraft.server.v1_8_R3.MinecraftServer; + +import static mineplex.core.Managers.require; /** * Gem Hunters main class
@@ -245,7 +247,7 @@ public class GemHunters extends JavaPlugin // Though if any other module needs one of these it will be generated in // order, however they are all here just for good measure.s require(BetaModule.class); - require(DebugModule.class); + //require(DebugModule.class); require(BountyModule.class); require(CashOutModule.class); require(ChatModule.class); @@ -284,6 +286,9 @@ public class GemHunters extends JavaPlugin // Turn off the server's debugging MinecraftServer.getServer().getPropertyManager().setProperty("debug", false); SpigotConfig.debug = false; + + // beta whitelist + new BetaWhitelist(clientManager, new PowerPlayClubRepository(this, clientManager, donationManager)); } @Override diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/InventoryModule.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/InventoryModule.java index 0f72525fd..1ea26c086 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/InventoryModule.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/InventoryModule.java @@ -23,7 +23,6 @@ import mineplex.core.common.util.UtilEvent.ActionType; import mineplex.core.common.util.UtilInv; import mineplex.core.itemstack.ItemBuilder; import mineplex.gemhunters.death.event.PlayerCustomRespawnEvent; -import mineplex.gemhunters.debug.DebugModule; @ReflectivelyCreateMiniPlugin public class InventoryModule extends MiniPlugin @@ -119,9 +118,9 @@ public class InventoryModule extends MiniPlugin int end = Math.min(inv.getSize(), start + slots); int delta = end - start; - DebugModule.getInstance().d("start=" + start); - DebugModule.getInstance().d("end=" + end); - DebugModule.getInstance().d("delta=" + delta); + //DebugModule.getInstance().d("start=" + start); + //DebugModule.getInstance().d("end=" + end); + //DebugModule.getInstance().d("delta=" + delta); for (int i = start; i < end; i++) { diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/LootModule.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/LootModule.java index 421101c7d..77cc84abf 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/LootModule.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/LootModule.java @@ -35,11 +35,9 @@ import mineplex.core.common.util.UtilInv; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTime; -import mineplex.core.common.util.UtilWorld; import mineplex.core.google.GoogleSheetsManager; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.gemhunters.debug.DebugModule; import mineplex.gemhunters.economy.EconomyModule; import mineplex.gemhunters.economy.PlayerCashOutCompleteEvent; import mineplex.gemhunters.loot.command.SpawnChestCommand; @@ -321,7 +319,7 @@ public class LootModule extends MiniPlugin return; } - DebugModule.getInstance().d("Spawned at " + UtilWorld.blockToStrClean(block) + " with key=" + key + " and index=" + index + " and max=" + spawned + "/" + max); + //DebugModule.getInstance().d("Spawned at " + UtilWorld.blockToStrClean(block) + " with key=" + key + " and index=" + index + " and max=" + spawned + "/" + max); _spawnedChest.add(new SpawnedChest(chestToPlace, properties, index)); block.setType(properties.getBlockMaterial()); } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootChestReward.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootChestReward.java index 031e859f6..5ef354ec1 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootChestReward.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootChestReward.java @@ -5,7 +5,6 @@ import org.bukkit.inventory.ItemStack; import mineplex.core.Managers; import mineplex.core.common.util.Callback; import mineplex.core.inventory.InventoryManager; -import mineplex.gemhunters.debug.DebugModule; public class LootChestReward extends LootItemReward { @@ -39,7 +38,7 @@ public class LootChestReward extends LootItemReward @Override public void run(Boolean success) { - DebugModule.getInstance().d("Success= " + success); + //DebugModule.getInstance().d("Success= " + success); } }, _player, _chestName + " Chest", _amount); } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootGadgetReward.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootGadgetReward.java index 1d8dc728a..8fa2e0be7 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootGadgetReward.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootGadgetReward.java @@ -6,7 +6,6 @@ import mineplex.core.Managers; import mineplex.core.common.currency.GlobalCurrency; import mineplex.core.donation.DonationManager; import mineplex.core.donation.Donor; -import mineplex.gemhunters.debug.DebugModule; public class LootGadgetReward extends LootItemReward { @@ -36,12 +35,12 @@ public class LootGadgetReward extends LootItemReward if (donor.ownsUnknownSalesPackage(_gadget)) { - DebugModule.getInstance().d("Shard duplicate"); + //DebugModule.getInstance().d("Shard duplicate"); donor.addBalance(GlobalCurrency.TREASURE_SHARD, (int) (500 + Math.random() * 1000)); } else { - DebugModule.getInstance().d("Adding gadget"); + //DebugModule.getInstance().d("Adding gadget"); donor.addOwnedUnknownSalesPackage(_gadget); } } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootItemReward.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootItemReward.java index 8a00d0540..0ed3b9df2 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootItemReward.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/loot/rewards/LootItemReward.java @@ -10,7 +10,6 @@ import mineplex.core.common.util.UtilServer; import mineplex.core.common.util.UtilTextMiddle; import mineplex.core.common.util.UtilTime; import mineplex.core.recharge.Recharge; -import mineplex.gemhunters.debug.DebugModule; public abstract class LootItemReward { @@ -69,7 +68,7 @@ public abstract class LootItemReward public final void success() { - DebugModule.getInstance().d("Success"); + //DebugModule.getInstance().d("Success"); onSuccessful(); } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/ChestOpenerQuest.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/ChestOpenerQuest.java index 7af52015d..ed1591623 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/ChestOpenerQuest.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/quest/types/ChestOpenerQuest.java @@ -4,7 +4,6 @@ import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import mineplex.core.common.util.F; -import mineplex.gemhunters.debug.DebugModule; import mineplex.gemhunters.loot.event.PlayerChestOpenEvent; import mineplex.gemhunters.quest.Quest; @@ -35,7 +34,7 @@ public class ChestOpenerQuest extends Quest @EventHandler public void chestOpen(PlayerChestOpenEvent event) { - DebugModule.getInstance().d(event.getEventName()); + //DebugModule.getInstance().d(event.getEventName()); Player player = event.getPlayer(); if (!isActive(player)) diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/shop/ShopModule.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/shop/ShopModule.java index 5bdba8cf0..96d41d9fa 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/shop/ShopModule.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/shop/ShopModule.java @@ -17,12 +17,10 @@ import mineplex.core.ReflectivelyCreateMiniPlugin; import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilMath; import mineplex.core.common.util.UtilTime; -import mineplex.core.common.util.UtilWorld; import mineplex.core.google.GoogleSheetsManager; import mineplex.core.google.SheetObjectDeserialiser; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.gemhunters.debug.DebugModule; import mineplex.gemhunters.loot.deserialisers.LootItemDeserialiser; import mineplex.gemhunters.safezone.SafezoneModule; import mineplex.gemhunters.shop.deserialisers.VillagerPropertiesDeserialiser; @@ -220,7 +218,7 @@ public class ShopModule extends MiniPlugin usedIndexes.add(index); - DebugModule.getInstance().d("Trader at " + UtilWorld.locToStrClean(randomLocation) + " with key=" + key + " and index=" + index + " and max=" + spawned + "/" + max); + //DebugModule.getInstance().d("Trader at " + UtilWorld.locToStrClean(randomLocation) + " with key=" + key + " and index=" + index + " and max=" + spawned + "/" + max); _npcs.add(new TraderNPC(_plugin, randomLocation, Villager.class, NAMES[UtilMath.r(NAMES.length)], _safezone.isInSafeZone(randomLocation), properties, getRandomItemSet(_trades.get(key)))); } } diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/UndergroundMobs.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/UndergroundMobs.java index b1e2ba508..2369868f1 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/UndergroundMobs.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/UndergroundMobs.java @@ -22,7 +22,6 @@ import mineplex.core.common.util.UtilAlg; import mineplex.core.common.util.UtilMath; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; -import mineplex.gemhunters.debug.DebugModule; public class UndergroundMobs implements Listener { @@ -67,7 +66,7 @@ public class UndergroundMobs implements Listener } } - DebugModule.getInstance().d("Spawning mobs " + _entities.size()); + //DebugModule.getInstance().d("Spawning mobs " + _entities.size()); for (int i = 0; i < 10; i++) { diff --git a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java index 3313ec499..82e91f732 100644 --- a/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java +++ b/Plugins/mineplex-game-gemhunters/src/mineplex/gemhunters/world/WorldListeners.java @@ -34,7 +34,6 @@ import org.bukkit.inventory.BrewerInventory; import org.bukkit.plugin.java.JavaPlugin; import mineplex.core.common.util.UtilWorld; -import mineplex.gemhunters.debug.DebugModule; public class WorldListeners implements Listener { @@ -173,7 +172,7 @@ public class WorldListeners implements Listener { Player player = (Player) event.getEntity(); - DebugModule.getInstance().d(player.getName() + " hunger " + player.getFoodLevel() + " -> " + event.getFoodLevel()); + //DebugModule.getInstance().d(player.getName() + " hunger " + player.getFoodLevel() + " -> " + event.getFoodLevel()); // Some witchcraft from the arcade, seems to make hunger not ridiculous. player.setSaturation(3.8F); } @@ -183,7 +182,7 @@ public class WorldListeners implements Listener { if (event.toWeatherState()) { - DebugModule.getInstance().d("Cancelling a weather change"); + //DebugModule.getInstance().d("Cancelling a weather change"); event.setCancelled(true); event.getWorld().setStorm(false); }