From f2d1709adbd17b4eda34987512365cdd1d4beae9 Mon Sep 17 00:00:00 2001 From: Chiss Date: Sun, 1 Jun 2014 18:18:58 +1000 Subject: [PATCH] Hub update --- .../src/mineplex/core/recharge/Recharge.java | 2 +- .../src/mineplex/hub/gadget/gadgets/ItemBatGun.java | 2 +- .../hub/gadget/gadgets/ItemPaintballGun.java | 3 ++- .../src/mineplex/hub/gadget/gadgets/ItemTNT.java | 13 ++++++++----- .../src/mineplex/hub/gadget/types/ItemGadget.java | 5 +++++ .../src/mineplex/hub/gadget/ui/GadgetPage.java | 11 +++++++++-- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/recharge/Recharge.java b/Plugins/Mineplex.Core/src/mineplex/core/recharge/Recharge.java index 15a41bdca..6c7dbf448 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/recharge/Recharge.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/recharge/Recharge.java @@ -116,7 +116,7 @@ public class Recharge extends MiniPlugin recharge(); //Lodge Recharge Msg - if (inform && recharge > 200) + if (inform && recharge > 1000) informSet.add(ability); //Recharging diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemBatGun.java b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemBatGun.java index 440001b37..a10fdecd8 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemBatGun.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemBatGun.java @@ -42,7 +42,7 @@ public class ItemBatGun extends ItemGadget }, -1, Material.IRON_BARDING, (byte)0, - 6000, 4, false); + 5000, 5, false); } @Override diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemPaintballGun.java b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemPaintballGun.java index 2a1b76bfa..621363f5a 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemPaintballGun.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemPaintballGun.java @@ -18,6 +18,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause; import mineplex.core.common.util.C; import mineplex.core.common.util.UtilBlock; +import mineplex.core.recharge.Recharge; import mineplex.core.updater.UpdateType; import mineplex.core.updater.event.UpdateEvent; import mineplex.hub.gadget.GadgetManager; @@ -35,7 +36,7 @@ public class ItemPaintballGun extends ItemGadget }, -1, Material.GOLD_BARDING, (byte)0, - 1000, 2, false); + 500, 2, false); } @Override diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemTNT.java b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemTNT.java index 504bfecc7..700133097 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemTNT.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/gadgets/ItemTNT.java @@ -27,7 +27,7 @@ import mineplex.hub.gadget.types.ItemGadget; public class ItemTNT extends ItemGadget { - private HashSet _gems = new HashSet(); + //private HashSet _gems = new HashSet(); public ItemTNT(GadgetManager manager) { @@ -39,7 +39,7 @@ public class ItemTNT extends ItemGadget }, -1, Material.TNT, (byte)0, - 5000, 400, false); + 1000, 50, false); } @Override @@ -79,7 +79,8 @@ public class ItemTNT extends ItemGadget double mult = players.get(player); //Drop Gems - int gemDrop = (int)(15*mult); + /* + int gemDrop = (int)(10*mult); Manager.Manager.GetDonation().RewardGems(null, GetName() + " Hit", player.getName(), -(gemDrop*4)); @@ -95,12 +96,13 @@ public class ItemTNT extends ItemGadget _gems.add(gem); } + */ //Knockback - UtilAction.velocity(player, UtilAlg.getTrajectory(event.getLocation(), player.getLocation()), 2.4 * mult, false, 0, 0.5 + 1 * mult, 10, true); + UtilAction.velocity(player, UtilAlg.getTrajectory(event.getLocation(), player.getLocation()), 3 * mult, false, 0, 0.5 + 2 * mult, 10, true); } } - + /* @EventHandler public void Pickup(PlayerPickupItemEvent event) { @@ -136,4 +138,5 @@ public class ItemTNT extends ItemGadget } } } + */ } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/types/ItemGadget.java b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/types/ItemGadget.java index dbaff8a3a..dfe7a9121 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/types/ItemGadget.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/types/ItemGadget.java @@ -141,4 +141,9 @@ public abstract class ItemGadget extends Gadget } public abstract void ActivateCustom(Player player); + + public int GetGemsPerUse() + { + return _gemsPerUse; + } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/ui/GadgetPage.java b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/ui/GadgetPage.java index 33bb8838b..c5b1db5f9 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/ui/GadgetPage.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/gadget/ui/GadgetPage.java @@ -154,9 +154,16 @@ public class GadgetPage extends ShopPageBase { itemLore.add(C.cYellow + gadget.GetCost(CurrencyType.Gems) + " Gems"); } - else if (gadget.GetCost(CurrencyType.Gems) != -1) + if (gadget instanceof ItemGadget) { - itemLore.add(C.cYellow + gadget.GetCost(CurrencyType.Gems) + " Gems"); + ItemGadget itemGadget = (ItemGadget)gadget; + + if (itemGadget.GetGemsPerUse() > 0) + { + itemLore.add(" "); + itemLore.add(C.cRed + C.Bold + "WARNING: "); + itemLore.add(C.cWhite + "Costs " + C.cGreen + itemGadget.GetGemsPerUse() + " Gems" + C.cWhite + " per Use"); + } } itemLore.add(C.cBlack);