From 0109e2f2dda551a70d454f650de53df3d9f22660 Mon Sep 17 00:00:00 2001 From: LCastr0 Date: Fri, 20 May 2016 23:33:58 -0300 Subject: [PATCH] Fixes for Illuminated chest Fixes for /check command (Support) --- .../src/mineplex/core/donation/Donor.java | 5 ++ .../mineplex/core/gadget/GadgetManager.java | 2 + .../core/gadget/commands/AmmoCommand.java | 7 -- .../gadget/commands/LockCosmeticsCommand.java | 71 +++++++++++++++++++ .../commands/UnlockCosmeticsCommand.java | 9 +-- .../gadgets/arrowtrail/ArrowTrailCupid.java | 2 +- .../gadgets/death/DeathCupidsBrokenHeart.java | 2 +- .../doublejump/DoubleJumpCupidsWings.java | 2 +- .../gadget/gadgets/hat/HatCompanionBlock.java | 2 +- .../gadgets/particle/ParticleHeart.java | 4 +- .../wineffect/WinEffectMrPunchMan.java | 2 +- .../core/treasure/TreasureLocation.java | 1 + .../core/treasure/gui/BuyChestButton.java | 4 -- .../core/treasure/gui/TreasurePage.java | 14 ++-- .../customerSupport/CustomerSupport.java | 34 ++++++--- .../salespackage/SalesPackageManager.java | 34 +++------ .../salespackages/IlluminatedChest.java | 21 ++++++ 17 files changed, 148 insertions(+), 68 deletions(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockCosmeticsCommand.java create mode 100644 Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/IlluminatedChest.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/donation/Donor.java b/Plugins/Mineplex.Core/src/mineplex/core/donation/Donor.java index c6e583835..267a582b8 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/donation/Donor.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/donation/Donor.java @@ -122,6 +122,11 @@ public class Donor { _unknownSalesPackagesOwned.add(packageName); } + + public void RemoveUnknownSalesPackagesOwned(String packageName) + { + _unknownSalesPackagesOwned.remove(packageName); + } public List getTransactions() { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java index d229eda48..4db365d1a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/GadgetManager.java @@ -6,6 +6,7 @@ import java.util.List; import java.util.Set; import java.util.function.Predicate; +import mineplex.core.gadget.commands.LockCosmeticsCommand; import org.bukkit.Bukkit; import org.bukkit.Location; import org.bukkit.Material; @@ -245,6 +246,7 @@ public class GadgetManager extends MiniPlugin public void addCommands() { addCommand(new UnlockCosmeticsCommand(this)); + addCommand(new LockCosmeticsCommand(this)); addCommand(new AmmoCommand(this)); } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/AmmoCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/AmmoCommand.java index e611c1398..e7d3bdeff 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/AmmoCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/AmmoCommand.java @@ -24,13 +24,6 @@ public class AmmoCommand extends CommandBase @Override public void Execute(Player caller, String[] args) { - boolean testServer = _plugin.getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing"); - - if(!testServer) - { - UtilPlayer.message(caller, F.elem("This command can only be used on test servers!")); - } - if(args.length == 2) { String gadgetName = args[0]; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockCosmeticsCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockCosmeticsCommand.java new file mode 100644 index 000000000..437ee0550 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/LockCosmeticsCommand.java @@ -0,0 +1,71 @@ +package mineplex.core.gadget.commands; + +import mineplex.core.command.CommandBase; +import mineplex.core.common.Rank; +import mineplex.core.common.util.F; +import mineplex.core.common.util.UtilPlayer; +import mineplex.core.gadget.GadgetManager; +import mineplex.core.gadget.types.Gadget; +import mineplex.core.gadget.types.GadgetType; +import org.bukkit.entity.Player; + +public class LockCosmeticsCommand extends CommandBase +{ + + private GadgetManager _plugin; + + public LockCosmeticsCommand(GadgetManager plugin) + { + super(plugin, Rank.JNR_DEV, new Rank[]{Rank.SNR_MODERATOR}, "lockCosmetics"); + _plugin = plugin; + } + + @Override + public void Execute(Player caller, String[] args) + { + // Adds all cosmetic types + if (args.length == 0) + { + addCosmetics(null, caller); + } + // Adds specific type + else + { + String type = args[0]; + if (type.equalsIgnoreCase("all")) + { + addCosmetics(null, caller); + } + else + { + GadgetType gadgetType = GadgetType.valueOf(type); + if (gadgetType == null) + { + UtilPlayer.message(caller, F.main("Cosmetics", "Invalid cosmetic type!")); + } + else + { + addCosmetics(gadgetType, caller); + } + } + } + + } + + private void addCosmetics(GadgetType gadgetType, Player caller) + { + if (gadgetType == null) + { + for (GadgetType type : GadgetType.values()) + { + addCosmetics(type, caller); + } + return; + } + for (Gadget gadget : _plugin.getGadgets(gadgetType)) + { + _plugin.getDonationManager().Get(caller.getName()).RemoveUnknownSalesPackagesOwned(gadget.GetName()); + } + UtilPlayer.message(caller, F.main("Cosmetics", "Removed all the " + gadgetType.name() + " cosmetics!")); + } +} \ No newline at end of file diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java index 9a84ffc50..44a2a3643 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/commands/UnlockCosmeticsCommand.java @@ -16,20 +16,13 @@ public class UnlockCosmeticsCommand extends CommandBase public UnlockCosmeticsCommand(GadgetManager plugin) { - super(plugin, Rank.JNR_DEV, "unlockCosmetics"); + super(plugin, Rank.JNR_DEV, new Rank[]{Rank.SNR_MODERATOR}, "unlockCosmetics"); _plugin = plugin; } @Override public void Execute(Player caller, String[] args) { - boolean testServer = _plugin.getPlugin().getConfig().getString("serverstatus.group").equalsIgnoreCase("Testing"); - - if(!testServer) - { - UtilPlayer.message(caller, F.elem("This command can only be used on test servers!")); - } - // Adds all cosmetic types if (args.length == 0) { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java index 6cc5bef99..d13aa5f67 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/arrowtrail/ArrowTrailCupid.java @@ -21,7 +21,7 @@ public class ArrowTrailCupid extends ArrowEffectGadget { super(manager, "Cupid's Arrows", UtilText.splitLineToArray("That’s the power of love!", LineFormat.LORE), - -2, Material.APPLE, (byte)0); + -2, Material.APPLE, (byte)0, "Arrows of Cupid"); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java index 0275a582b..d0053f9df 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/death/DeathCupidsBrokenHeart.java @@ -20,7 +20,7 @@ public class DeathCupidsBrokenHeart extends DeathEffectGadget { super(manager, "Cupid's Broken Heart", UtilText.splitLineToArray("Cue the weeping violins...", LineFormat.LORE), - -2, Material.APPLE, (byte) 0); + -2, Material.APPLE, (byte) 0, "Broken Hearted"); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java index aac4117c2..a7f19b097 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/doublejump/DoubleJumpCupidsWings.java @@ -31,7 +31,7 @@ public class DoubleJumpCupidsWings extends DoubleJumpEffectGadget { super(manager, "Cupid's Wings", UtilText.splitLineToArray("Take flight on the wings of love!", LineFormat.LORE), - -2, Material.APPLE, (byte)0); + -2, Material.APPLE, (byte)0, "Wings of Love"); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatCompanionBlock.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatCompanionBlock.java index 7f72c4f82..770e16b2a 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatCompanionBlock.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/hat/HatCompanionBlock.java @@ -14,7 +14,7 @@ public class HatCompanionBlock extends HatGadget { super(manager, "Companion Block", UtilText.splitLineToArray(C.cGray + "The Enrichment Center is required to remind you that the Weighted Companion cube cannot talk. In the event that it does talk The Enrichment Center asks you to ignore its advice.", LineFormat.LORE), - -2, SkinData.COMPANION_CUBE.getSkull(), "Companion Block"); + -2, SkinData.COMPANION_CUBE.getSkull(), "Companion"); } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java index b863cb417..a969e9495 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/particle/ParticleHeart.java @@ -23,9 +23,9 @@ public class ParticleHeart extends ParticleGadget public ParticleHeart(GadgetManager manager) { - super(manager, "Cupids Love", + super(manager, "Cupid's Love", UtilText.splitLineToArray(C.cGray + "Share the love you feel in your heart with everybody near you!", LineFormat.LORE), -2, - Material.APPLE, (byte) 0, "I Heart You"); + Material.APPLE, (byte) 0, "I Heart You", "Cupids Love", "Heartfelt Halo"); } @Override diff --git a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java index 5e07cc91c..8a748db9b 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/gadget/gadgets/wineffect/WinEffectMrPunchMan.java @@ -28,7 +28,7 @@ public class WinEffectMrPunchMan extends WinEffectGadget public WinEffectMrPunchMan(GadgetManager manager) { - super(manager, "Mr.Punchman", UtilText.splitLineToArray(C.cGray + "Some say he's still punching on that oversized punching bag in the sky.", LineFormat.LORE), + super(manager, "Mr. Punchman", UtilText.splitLineToArray(C.cGray + "Some say he's still punching on that oversized punching bag in the sky.", LineFormat.LORE), -2, Material.IRON_AXE, (byte) 0); _schematicName = "FlatPodium"; diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java index 07a9e25bf..661216f52 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/TreasureLocation.java @@ -201,6 +201,7 @@ public class TreasureLocation implements Listener private void chargeAccount(Player player, TreasureType treasureType, Callback callback) { int itemCount = _inventoryManager.Get(player).getItemCount(treasureType.getItemName()); + player.sendMessage("COUNT: " + itemCount); if (itemCount > 0) { // Should always handle the callback for us diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/BuyChestButton.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/BuyChestButton.java index e40d84095..b74ded372 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/BuyChestButton.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/BuyChestButton.java @@ -5,7 +5,6 @@ import org.bukkit.Material; import org.bukkit.entity.Player; import org.bukkit.event.inventory.ClickType; -import mineplex.core.account.event.GetClientEvent; import mineplex.core.common.CurrencyType; import mineplex.core.common.util.F; import mineplex.core.common.util.UtilPlayer; @@ -13,9 +12,6 @@ import mineplex.core.inventory.InventoryManager; import mineplex.core.shop.item.IButton; import mineplex.core.shop.page.ConfirmationPage; import mineplex.core.treasure.ChestPackage; -import org.bukkit.Material; -import org.bukkit.entity.Player; -import org.bukkit.event.inventory.ClickType; public class BuyChestButton implements IButton { diff --git a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java index 18dc9490e..e44327fa2 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/treasure/gui/TreasurePage.java @@ -46,12 +46,12 @@ public class TreasurePage extends ShopPageBase int christmasCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.CHRISTMAS.getItemName()); int illuminatedCount = _inventoryManager.Get(getPlayer()).getItemCount(TreasureType.ILLUMINATED.getItemName()); - List shardLore = new ArrayList(); + List shardLore = new ArrayList<>(); shardLore.add(" "); shardLore.add(C.cGray + "This seems like it might come in"); shardLore.add(C.cGray + "handy. Maybe I can collect more!"); - List basicLore = new ArrayList(); + List basicLore = new ArrayList<>(); basicLore.add(" "); basicLore.add(F.value("Old Chests Owned", "" + basicCount)); basicLore.add(" "); @@ -71,7 +71,7 @@ public class TreasurePage extends ShopPageBase basicLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop"); } - List heroicLore = new ArrayList(); + List heroicLore = new ArrayList<>(); heroicLore.add(" "); heroicLore.add(F.value("Ancient Chests Owned", "" + heroicCount)); heroicLore.add(" "); @@ -88,7 +88,7 @@ public class TreasurePage extends ShopPageBase heroicLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop"); } - List legendaryLore = new ArrayList(); + List legendaryLore = new ArrayList<>(); legendaryLore.add(" "); legendaryLore.add(F.value("Mythical Chests Owned", "" + legendaryCount)); legendaryLore.add(" "); @@ -108,7 +108,7 @@ public class TreasurePage extends ShopPageBase legendaryLore.add(ChatColor.RESET + "or Purchase at: " + C.cYellow + "www.mineplex.com/shop"); } - List christmasLore = new ArrayList(); + List christmasLore = new ArrayList<>(); christmasLore.add(" "); christmasLore.add(F.value("Winter Holiday Chests Owned", "" + christmasCount)); christmasLore.add(" "); @@ -155,11 +155,11 @@ public class TreasurePage extends ShopPageBase addItem(40, shards); + addChest(12, christmas, TreasureType.CHRISTMAS, christmasCount); + addChest(14, illuminated, TreasureType.ILLUMINATED, illuminatedCount); addChest(20, basic, TreasureType.OLD, basicCount); addChest(22, heroic, TreasureType.ANCIENT, heroicCount); addChest(24, legendary, TreasureType.MYTHICAL, legendaryCount); - addChest(12, christmas, TreasureType.CHRISTMAS, christmasCount); - addChest(14, illuminated, TreasureType.ILLUMINATED, illuminatedCount); } private void addChest(int slot, ItemStack item, TreasureType treasureType, int owned) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java index 85502fd37..33570939f 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/customerSupport/CustomerSupport.java @@ -115,16 +115,17 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable public void run() { caller.sendMessage(C.cDGreen + C.Strike + "============================================="); - caller.sendMessage(C.cBlue + "Name : " + C.cYellow + playerName); - caller.sendMessage(C.cBlue + "Rank : " + C.cYellow + (client.GetRank() == null ? C.cRed + "Error rank null!" : (client.GetRank().Name.isEmpty() ? "Regular" : client.GetRank().Name))); - caller.sendMessage(C.cBlue + "Coins : " + C.cYellow + donor.getCoins()); - caller.sendMessage(C.cBlue + "Gems : " + C.cYellow + donor.GetGems()); + caller.sendMessage(C.cBlue + "Name: " + C.cYellow + playerName); + caller.sendMessage(C.cBlue + "Rank: " + C.cYellow + (client.GetRank() == null ? C.cRed + "Error rank null!" : (client.GetRank().Name.isEmpty() ? "Regular" : client.GetRank().Name))); + caller.sendMessage(C.cBlue + "Coins: " + C.cYellow + donor.getCoins()); + caller.sendMessage(C.cBlue + "Gems: " + C.cYellow + donor.GetGems()); int enjinCoinsReceived = 0; int oldChestsReceived = 0; int ancientChestsReceived = 0; int mythicalChestsReceived = 0; int winterChestsReceived = 0; + int illuminatedChestsReceived = 0; int valentinesGiftsReceived = 0; for (CoinTransactionToken transaction : donor.getCoinTransactions()) @@ -182,6 +183,17 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable } } + if (transaction.SalesPackageName.startsWith("Illuminated Chest")) + { + if (transaction.Coins == 0 && transaction.Gems == 0) + { + if (transaction.SalesPackageName.split(" ").length == 3) + illuminatedChestsReceived += Integer.parseInt(transaction.SalesPackageName.split(" ")[2]); + else if (transaction.SalesPackageName.split(" ").length == 2) + illuminatedChestsReceived += 1; + } + + } if (transaction.SalesPackageName.startsWith("Valentines Gift")) { if (transaction.Coins == 0 && transaction.Gems == 0) @@ -194,13 +206,13 @@ public class CustomerSupport extends MiniPlugin implements ResultSetCallable } } - - caller.sendMessage(C.cBlue + "Enjin Coin Total Received : " + C.cYellow + enjinCoinsReceived); - caller.sendMessage(C.cBlue + "Old Chests Received : " + C.cYellow + oldChestsReceived); - caller.sendMessage(C.cBlue + "Ancient Chests Received : " + C.cYellow + ancientChestsReceived); - caller.sendMessage(C.cBlue + "Mythical Chests Received : " + C.cYellow + mythicalChestsReceived); - caller.sendMessage(C.cBlue + "Winter Chests Received : " + C.cYellow + winterChestsReceived); - caller.sendMessage(C.cBlue + "Valentines Gifts Received : " + C.cYellow + valentinesGiftsReceived); + + // Strutt20 asked me to remove some stuff from the menu + caller.sendMessage(C.cBlue + "Enjin Coin Total Received: " + C.cYellow + enjinCoinsReceived); + caller.sendMessage(C.cBlue + "Old Chests Received: " + C.cYellow + oldChestsReceived); + caller.sendMessage(C.cBlue + "Ancient Chests Received: " + C.cYellow + ancientChestsReceived); + caller.sendMessage(C.cBlue + "Mythical Chests Received: " + C.cYellow + mythicalChestsReceived); + caller.sendMessage(C.cBlue + "Illuminated Chests Received: " + C.cYellow + illuminatedChestsReceived); caller.sendMessage(C.cBlue + "Monthly Bonus Log (Last 6 entries):"); if (_accountBonusLog.containsKey(client.getAccountId())) diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/SalesPackageManager.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/SalesPackageManager.java index debd2f265..1637cc111 100644 --- a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/SalesPackageManager.java +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/SalesPackageManager.java @@ -1,5 +1,6 @@ package mineplex.staffServer.salespackage; +import mineplex.staffServer.salespackage.salespackages.*; import org.bukkit.entity.Player; import org.bukkit.plugin.java.JavaPlugin; @@ -12,23 +13,6 @@ import mineplex.core.inventory.InventoryManager; import mineplex.core.stats.StatsManager; import mineplex.staffServer.salespackage.command.DisplayPackageCommand; import mineplex.staffServer.salespackage.command.Sales; -import mineplex.staffServer.salespackage.salespackages.AncientChest; -import mineplex.staffServer.salespackage.salespackages.ApplyKits; -import mineplex.staffServer.salespackage.salespackages.Coins; -import mineplex.staffServer.salespackage.salespackages.DefaultRank; -import mineplex.staffServer.salespackage.salespackages.EasterBunny; -import mineplex.staffServer.salespackage.salespackages.FrostLord; -import mineplex.staffServer.salespackage.salespackages.GemHunter; -import mineplex.staffServer.salespackage.salespackages.LifetimeHero; -import mineplex.staffServer.salespackage.salespackages.LifetimeLegend; -import mineplex.staffServer.salespackage.salespackages.LifetimeTitan; -import mineplex.staffServer.salespackage.salespackages.LifetimeUltra; -import mineplex.staffServer.salespackage.salespackages.MonthlyHero; -import mineplex.staffServer.salespackage.salespackages.MonthlyUltra; -import mineplex.staffServer.salespackage.salespackages.MythicalChest; -import mineplex.staffServer.salespackage.salespackages.SalesPackageBase; -import mineplex.staffServer.salespackage.salespackages.OldChest; -import mineplex.staffServer.salespackage.salespackages.ValentinesGift; public class SalesPackageManager extends MiniPlugin { @@ -47,24 +31,26 @@ public class SalesPackageManager extends MiniPlugin _donationManager = donationManager; _inventoryManager = inventoryManager; _statsManager = statsManager; - + + //Strutt20 asked me to remove some of the stuff from the menu AddSalesPackage(new Coins(this, 5000)); AddSalesPackage(new Coins(this, 25000)); AddSalesPackage(new Coins(this, 75000)); - AddSalesPackage(new MonthlyUltra(this)); - AddSalesPackage(new MonthlyHero(this)); + //AddSalesPackage(new MonthlyUltra(this)); + //AddSalesPackage(new MonthlyHero(this)); AddSalesPackage(new DefaultRank(this)); AddSalesPackage(new LifetimeUltra(this)); AddSalesPackage(new LifetimeHero(this)); AddSalesPackage(new LifetimeLegend(this)); AddSalesPackage(new LifetimeTitan(this)); - AddSalesPackage(new GemHunter(this, 4)); - AddSalesPackage(new GemHunter(this, 8)); + //AddSalesPackage(new GemHunter(this, 4)); + //AddSalesPackage(new GemHunter(this, 8)); AddSalesPackage(new ApplyKits(this)); AddSalesPackage(new OldChest(this)); AddSalesPackage(new AncientChest(this)); AddSalesPackage(new MythicalChest(this)); - AddSalesPackage(new ValentinesGift(this)); + AddSalesPackage(new IlluminatedChest(this)); + //AddSalesPackage(new ValentinesGift(this)); AddSalesPackage(new FrostLord(this)); AddSalesPackage(new EasterBunny(this)); } @@ -117,7 +103,7 @@ public class SalesPackageManager extends MiniPlugin { coinBuilder = coinBuilder.extra("[").color("gray").extra(salesPackage.getName()).color("green").click("run_command", "/display " + playerName + " " + salesPackage.getName()).extra("] ").color("gray"); } - else if (salesPackage instanceof MythicalChest || salesPackage instanceof AncientChest || salesPackage instanceof OldChest) + else if (salesPackage instanceof MythicalChest || salesPackage instanceof AncientChest || salesPackage instanceof OldChest || salesPackage instanceof IlluminatedChest) { chestBuilder = chestBuilder.extra("[").color("gray").extra(salesPackage.getName()).color("green").click("run_command", "/display " + playerName + " " + salesPackage.getName()).extra("] ").color("gray"); } diff --git a/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/IlluminatedChest.java b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/IlluminatedChest.java new file mode 100644 index 000000000..8e9f4e0fc --- /dev/null +++ b/Plugins/Mineplex.StaffServer/src/mineplex/staffServer/salespackage/salespackages/IlluminatedChest.java @@ -0,0 +1,21 @@ +package mineplex.staffServer.salespackage.salespackages; + +import mineplex.staffServer.salespackage.SalesPackageManager; +import org.bukkit.entity.Player; + +public class IlluminatedChest extends SalesPackageBase +{ + + public IlluminatedChest(SalesPackageManager manager) + { + super(manager, "1 Illuminated Chest"); + } + + public void displayToAgent(Player agent, String playerName) + { + addButton(agent, "/sales item " + playerName + " 1 Item Illuminated Chest", "Give 1 Illuminated Chest."); + agent.sendMessage(" "); + addBackButton(agent, playerName); + } + +}