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
1 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ public abstract class ItemUsable extends Item implements IThrown
@EventHandler
public void Use(PlayerInteractEvent event)
{
{
if (_useAction == null)
return;
@ -76,7 +76,7 @@ public abstract class ItemUsable extends Item implements IThrown
if (!UtilGear.isMat(player.getItemInHand(), GetType()))
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;
if (!UtilEvent.isAction(event, _useAction))