Hub update

This commit is contained in:
Chiss 2014-06-01 18:18:58 +10:00
parent 040ffe0ae5
commit f2d1709adb
6 changed files with 26 additions and 10 deletions

View File

@ -116,7 +116,7 @@ public class Recharge extends MiniPlugin
recharge(); recharge();
//Lodge Recharge Msg //Lodge Recharge Msg
if (inform && recharge > 200) if (inform && recharge > 1000)
informSet.add(ability); informSet.add(ability);
//Recharging //Recharging

View File

@ -42,7 +42,7 @@ public class ItemBatGun extends ItemGadget
}, },
-1, -1,
Material.IRON_BARDING, (byte)0, Material.IRON_BARDING, (byte)0,
6000, 4, false); 5000, 5, false);
} }
@Override @Override

View File

@ -18,6 +18,7 @@ import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
import mineplex.core.common.util.C; import mineplex.core.common.util.C;
import mineplex.core.common.util.UtilBlock; import mineplex.core.common.util.UtilBlock;
import mineplex.core.recharge.Recharge;
import mineplex.core.updater.UpdateType; import mineplex.core.updater.UpdateType;
import mineplex.core.updater.event.UpdateEvent; import mineplex.core.updater.event.UpdateEvent;
import mineplex.hub.gadget.GadgetManager; import mineplex.hub.gadget.GadgetManager;
@ -35,7 +36,7 @@ public class ItemPaintballGun extends ItemGadget
}, },
-1, -1,
Material.GOLD_BARDING, (byte)0, Material.GOLD_BARDING, (byte)0,
1000, 2, false); 500, 2, false);
} }
@Override @Override

View File

@ -27,7 +27,7 @@ import mineplex.hub.gadget.types.ItemGadget;
public class ItemTNT extends ItemGadget public class ItemTNT extends ItemGadget
{ {
private HashSet<Item> _gems = new HashSet<Item>(); //private HashSet<Item> _gems = new HashSet<Item>();
public ItemTNT(GadgetManager manager) public ItemTNT(GadgetManager manager)
{ {
@ -39,7 +39,7 @@ public class ItemTNT extends ItemGadget
}, },
-1, -1,
Material.TNT, (byte)0, Material.TNT, (byte)0,
5000, 400, false); 1000, 50, false);
} }
@Override @Override
@ -79,7 +79,8 @@ public class ItemTNT extends ItemGadget
double mult = players.get(player); double mult = players.get(player);
//Drop Gems //Drop Gems
int gemDrop = (int)(15*mult); /*
int gemDrop = (int)(10*mult);
Manager.Manager.GetDonation().RewardGems(null, GetName() + " Hit", player.getName(), -(gemDrop*4)); Manager.Manager.GetDonation().RewardGems(null, GetName() + " Hit", player.getName(), -(gemDrop*4));
@ -95,12 +96,13 @@ public class ItemTNT extends ItemGadget
_gems.add(gem); _gems.add(gem);
} }
*/
//Knockback //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 @EventHandler
public void Pickup(PlayerPickupItemEvent event) public void Pickup(PlayerPickupItemEvent event)
{ {
@ -136,4 +138,5 @@ public class ItemTNT extends ItemGadget
} }
} }
} }
*/
} }

View File

@ -141,4 +141,9 @@ public abstract class ItemGadget extends Gadget
} }
public abstract void ActivateCustom(Player player); public abstract void ActivateCustom(Player player);
public int GetGemsPerUse()
{
return _gemsPerUse;
}
} }

View File

@ -154,9 +154,16 @@ public class GadgetPage extends ShopPageBase<GadgetManager, GadgetShop>
{ {
itemLore.add(C.cYellow + gadget.GetCost(CurrencyType.Gems) + " Gems"); 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); itemLore.add(C.cBlack);