NPE fix for CommandMachine when dev staff is null

This commit is contained in:
Robert S 2014-06-19 02:22:29 -04:00
parent a4e300ad9a
commit 182876fb09

View file

@ -196,7 +196,7 @@ public class CommandMachine extends CommandBase
{
if (event.action == Action.RIGHT_CLICK_BLOCK)
{
if (event.entityPlayer.getHeldItem() != null && event.entityPlayer.getHeldItem().itemID == ResonantInduction.itemDevStaff.itemID)
if (event.entityPlayer.getHeldItem() != null && ResonantInduction.itemDevStaff != null && event.entityPlayer.getHeldItem().itemID == ResonantInduction.itemDevStaff.itemID)
{
if (event.entityPlayer.isSneaking())
{