Patch another NPE
This commit is contained in:
parent
46016b2aee
commit
a19200ac0c
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user