diff --git a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/item/ItemUsable.java b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/item/ItemUsable.java index 0dc602801..646c22a34 100644 --- a/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/item/ItemUsable.java +++ b/Plugins/Mineplex.Minecraft.Game.ClassCombat/src/mineplex/minecraft/game/classcombat/item/ItemUsable.java @@ -115,23 +115,35 @@ public abstract class ItemUsable extends Item implements IThrown @EventHandler public void Throw(PlayerInteractEvent event) { - if (_throwAction == null) + Bukkit.broadcastMessage("Throwing an ItemUsable (" + _itemName + ")"); + + if (_throwAction == null) + Bukkit.broadcastMessage("Action is null"); return; Player player = event.getPlayer(); if (((CraftPlayer)player).getHandle().spectating) + Bukkit.broadcastMessage("Player is spectating"); return; if (!UtilGear.isMat(player.getItemInHand(), GetType())) + Bukkit.broadcastMessage("Wrong material type"); + return; + + if (!UtilItem.getDisplayName(player.getItemInHand()).equals(_itemName)) + Bukkit.broadcastMessage("Wrong item name"); return; if (!UtilEvent.isAction(event, _throwAction)) + Bukkit.broadcastMessage("Throw action is not an action"); return; if (UtilBlock.usable(event.getClickedBlock())) + Bukkit.broadcastMessage("Clicked block is not usable"); return; + Bukkit.broadcastMessage("Use is valid, now checking trigger/cooldown"); event.setCancelled(true); //Check Allowed @@ -139,9 +151,11 @@ public abstract class ItemUsable extends Item implements IThrown Bukkit.getServer().getPluginManager().callEvent(trigger); if (trigger.IsCancelled()) + Bukkit.broadcastMessage("Trigger was cancelled"); return; if (!EnergyRecharge(player, GetName(), _throwEnergy, _throwDelay)) + Bukkit.broadcastMessage("On cooldown"); return; if (_throwStock)