Patch another NPE

This commit is contained in:
AlexTheCoder 2018-01-28 01:57:30 -05:00 committed by Alexander Meech
parent 46016b2aee
commit a19200ac0c

View File

@ -67,7 +67,7 @@ public abstract class ItemUsable extends Item implements IThrown
@EventHandler @EventHandler
public void Use(PlayerInteractEvent event) public void Use(PlayerInteractEvent event)
{ {
if (_useAction == null) if (_useAction == null)
return; return;
@ -76,7 +76,7 @@ public abstract class ItemUsable extends Item implements IThrown
if (!UtilGear.isMat(player.getItemInHand(), GetType())) if (!UtilGear.isMat(player.getItemInHand(), GetType()))
return; return;
if (!UtilItem.getDisplayName(player.getItemInHand()).equals(_itemName) && !UtilServer.getPlugin().getName().equals("Clans")) if ((UtilItem.getDisplayName(player.getItemInHand()) == null || !UtilItem.getDisplayName(player.getItemInHand()).equals(_itemName)) && !UtilServer.getPlugin().getName().equals("Clans"))
return; return;
if (!UtilEvent.isAction(event, _useAction)) if (!UtilEvent.isAction(event, _useAction))