Removed use of Gem Boosters
Cleaned up some unused imports.
This commit is contained in:
parent
172f4d20b7
commit
e7cf4eb51d
@ -38,12 +38,7 @@ public class CosmeticManager extends MiniPlugin
|
||||
private boolean _showInterface = true;
|
||||
private int _interfaceSlot = 4;
|
||||
|
||||
public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager, PetManager petManager, boolean useBooster)
|
||||
{
|
||||
this(plugin, clientManager, donationManager, inventoryManager, gadgetManager, mountManager, petManager, useBooster, null);
|
||||
}
|
||||
|
||||
public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager, PetManager petManager, boolean useBooster, TreasureManager treasureManager)
|
||||
public CosmeticManager(JavaPlugin plugin, CoreClientManager clientManager, DonationManager donationManager, InventoryManager inventoryManager, GadgetManager gadgetManager, MountManager mountManager, PetManager petManager, TreasureManager treasureManager)
|
||||
{
|
||||
super("Cosmetic Manager", plugin);
|
||||
|
||||
@ -53,7 +48,7 @@ public class CosmeticManager extends MiniPlugin
|
||||
_petManager = petManager;
|
||||
_treasureManager = treasureManager;
|
||||
|
||||
_shop = new CosmeticShop(this, clientManager, donationManager, _moduleName, useBooster);
|
||||
_shop = new CosmeticShop(this, clientManager, donationManager, _moduleName);
|
||||
}
|
||||
|
||||
public void showInterface(boolean showInterface)
|
||||
|
@ -20,13 +20,10 @@ import mineplex.core.updater.event.UpdateEvent;
|
||||
|
||||
public class CosmeticShop extends ShopBase<CosmeticManager> implements PluginMessageListener
|
||||
{
|
||||
private boolean _useBooster;
|
||||
|
||||
public CosmeticShop(CosmeticManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name, boolean useBooster)
|
||||
public CosmeticShop(CosmeticManager plugin, CoreClientManager clientManager, DonationManager donationManager, String name)
|
||||
{
|
||||
super(plugin, clientManager, donationManager, name, CurrencyType.Gems, CurrencyType.Coins);
|
||||
|
||||
_useBooster = useBooster;
|
||||
plugin.GetPlugin().getServer().getMessenger().registerIncomingPluginChannel(plugin.GetPlugin(), "MC|ItemName", this);
|
||||
}
|
||||
|
||||
@ -71,9 +68,4 @@ public class CosmeticShop extends ShopBase<CosmeticManager> implements PluginMes
|
||||
((TreasurePage) shop).update();
|
||||
}
|
||||
}
|
||||
|
||||
public boolean getBoosterEnabled()
|
||||
{
|
||||
return _useBooster;
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,6 @@ package mineplex.core.cosmetic.ui.page;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -13,7 +12,6 @@ import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.cosmetic.event.ActivateGemBoosterEvent;
|
||||
import mineplex.core.cosmetic.ui.CosmeticShop;
|
||||
import mineplex.core.cosmetic.ui.button.OpenCostumes;
|
||||
import mineplex.core.cosmetic.ui.button.OpenGadgets;
|
||||
@ -28,7 +26,6 @@ import mineplex.core.gadget.types.Gadget;
|
||||
import mineplex.core.gadget.types.GadgetType;
|
||||
import mineplex.core.inventory.GemBooster;
|
||||
import mineplex.core.mount.Mount;
|
||||
import mineplex.core.shop.item.IButton;
|
||||
import mineplex.core.shop.item.ShopItem;
|
||||
import mineplex.core.shop.item.SingleButton;
|
||||
import mineplex.core.shop.page.ConfirmationPage;
|
||||
@ -109,56 +106,6 @@ public class Menu extends ShopPageBase<CosmeticManager, CosmeticShop>
|
||||
}
|
||||
|
||||
AddButton(4, new ShopItem(Material.CHEST, ChatColor.RESET + C.cGreen + C.Bold + "Treasure Chest", lore.toArray(new String[0]), 1, false), new TreasureButton(this, treasureChestCount > 0, treasureKeyCount > 0, canPurchaseKey));
|
||||
|
||||
final GemBooster gemBoosterItem = new GemBooster(Shop.getBoosterEnabled(), Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster"));
|
||||
|
||||
|
||||
if (DonationManager.Get(Player.getName()).GetBalance(CurrencyType.Coins) >= gemBoosterItem.GetCost(CurrencyType.Coins)
|
||||
|| (Shop.getBoosterEnabled() && Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster") > 0))
|
||||
{
|
||||
AddButton(6, new ShopItem(
|
||||
gemBoosterItem.GetDisplayMaterial(),
|
||||
gemBoosterItem.GetDisplayName(),
|
||||
gemBoosterItem.GetDescription(),
|
||||
1,
|
||||
false),
|
||||
new IButton()
|
||||
{
|
||||
@Override
|
||||
public void ClickedLeft(Player player)
|
||||
{
|
||||
if (Shop.getBoosterEnabled() && Plugin.getInventoryManager().Get(Player).getItemCount("Gem Booster") > 0)
|
||||
{
|
||||
ActivateGemBoosterEvent boosterEvent = new ActivateGemBoosterEvent(player);
|
||||
Bukkit.getServer().getPluginManager().callEvent(boosterEvent);
|
||||
|
||||
if (!boosterEvent.isCancelled())
|
||||
Plugin.getInventoryManager().addItemToInventory(null, Player, "Utility", "Gem Booster", -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
purchaseGemBooster(gemBoosterItem, player);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ClickedRight(Player player)
|
||||
{
|
||||
purchaseGemBooster(gemBoosterItem, player);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddItem(6, new ShopItem(
|
||||
gemBoosterItem.GetDisplayMaterial(),
|
||||
gemBoosterItem.GetDisplayName(),
|
||||
gemBoosterItem.GetDescription(),
|
||||
1,
|
||||
false));
|
||||
}
|
||||
|
||||
AddButton(18, new ShopItem(Material.NETHER_STAR, "Particle Effects", 1, false), new OpenParticles(this));
|
||||
AddButton(20, new ShopItem(Material.BOW, "Gadgets", 1, false), new OpenGadgets(this));
|
||||
AddButton(22, new ShopItem(Material.LEATHER, "Morphs", 1, false), new OpenMorphs(this));
|
||||
|
@ -104,7 +104,7 @@ public class Clans extends JavaPlugin
|
||||
PetManager petManager = new PetManager(this, _clientManager, _donationManager, creature, webServerAddress);
|
||||
MountManager mountManager = new MountManager(this, _clientManager, _donationManager, blockRestore, disguiseManager);
|
||||
GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager);
|
||||
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, true);
|
||||
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, null);
|
||||
cosmeticManager.setInterfaceSlot(7);
|
||||
|
||||
new MemoryFix(this);
|
||||
|
@ -176,7 +176,7 @@ public class HubManager extends MiniClientPlugin<HubClient>
|
||||
new BenefitManager(plugin, clientManager, _inventoryManager);
|
||||
_gadgetManager = new GadgetManager(_plugin, clientManager, donationManager, _inventoryManager, _mountManager, petManager, preferences, disguiseManager, blockRestore, new ProjectileManager(plugin));
|
||||
_treasureManager = new TreasureManager(_plugin, donationManager, _inventoryManager, petManager, _blockRestore, hologramManager);
|
||||
new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, false, _treasureManager);
|
||||
new CosmeticManager(_plugin, clientManager, donationManager, _inventoryManager, _gadgetManager, _mountManager, petManager, _treasureManager);
|
||||
|
||||
_partyManager = partyManager;
|
||||
_preferences = preferences;
|
||||
|
@ -115,7 +115,7 @@ public class Arcade extends JavaPlugin
|
||||
PetManager petManager = new PetManager(this, _clientManager, _donationManager, creature, webServerAddress);
|
||||
MountManager mountManager = new MountManager(this, _clientManager, _donationManager, blockRestore, disguiseManager);
|
||||
GadgetManager gadgetManager = new GadgetManager(this, _clientManager, _donationManager, inventoryManager, mountManager, petManager, preferenceManager, disguiseManager, blockRestore, projectileManager);
|
||||
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, true);
|
||||
CosmeticManager cosmeticManager = new CosmeticManager(this, _clientManager, _donationManager, inventoryManager, gadgetManager, mountManager, petManager, null);
|
||||
cosmeticManager.setInterfaceSlot(7);
|
||||
|
||||
//Arcade Manager
|
||||
|
@ -1,7 +1,6 @@
|
||||
package nautilus.game.arcade;
|
||||
|
||||
import java.io.File;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -10,12 +9,9 @@ import java.util.UUID;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.ChatColor;
|
||||
import org.bukkit.Color;
|
||||
import org.bukkit.FireworkEffect;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.OfflinePlayer;
|
||||
import org.bukkit.FireworkEffect.Type;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftEntity;
|
||||
import org.bukkit.craftbukkit.v1_7_R4.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -42,11 +38,9 @@ import mineplex.core.chat.Chat;
|
||||
import mineplex.core.common.Rank;
|
||||
import mineplex.core.common.util.C;
|
||||
import mineplex.core.common.util.F;
|
||||
import mineplex.core.common.util.UtilFirework;
|
||||
import mineplex.core.common.util.UtilGear;
|
||||
import mineplex.core.common.util.UtilInv;
|
||||
import mineplex.core.common.util.UtilPlayer;
|
||||
import mineplex.core.common.util.UtilServer;
|
||||
import mineplex.core.cosmetic.CosmeticManager;
|
||||
import mineplex.core.creature.Creature;
|
||||
import mineplex.core.disguise.DisguiseManager;
|
||||
@ -68,8 +62,6 @@ import mineplex.core.status.ServerStatusManager;
|
||||
import mineplex.core.task.TaskManager;
|
||||
import mineplex.core.teleport.Teleport;
|
||||
import mineplex.core.timing.TimingManager;
|
||||
import mineplex.core.updater.UpdateType;
|
||||
import mineplex.core.updater.event.UpdateEvent;
|
||||
import mineplex.minecraft.game.classcombat.Class.ClassManager;
|
||||
import mineplex.minecraft.game.classcombat.Condition.SkillConditionManager;
|
||||
import mineplex.minecraft.game.classcombat.Skill.SkillFactory;
|
||||
@ -108,7 +100,6 @@ import nautilus.game.arcade.managers.GameSpectatorManager;
|
||||
import nautilus.game.arcade.managers.GameStatManager;
|
||||
import nautilus.game.arcade.managers.GameTournamentManager;
|
||||
import nautilus.game.arcade.managers.GameWorldManager;
|
||||
import nautilus.game.arcade.managers.HalloweenManager;
|
||||
import nautilus.game.arcade.managers.IdleManager;
|
||||
import nautilus.game.arcade.managers.MiscManager;
|
||||
import nautilus.game.arcade.shop.ArcadeShop;
|
||||
|
Loading…
Reference in New Issue
Block a user