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