Prevented a crash on right clicking with an empty hand

This commit is contained in:
Adubbz 2016-01-21 10:29:18 +11:00
parent 82cc16cf3c
commit 3e517b93c9

View file

@ -144,7 +144,7 @@ public class AchievementEventHandler
if (event.action != Action.LEFT_CLICK_BLOCK)
{
ItemStack stack = event.entityPlayer.getHeldItem();
Item item = stack.getItem();
Item item = stack != null ? stack.getItem() : null;
EntityPlayer player = event.entityPlayer;
//Gone Home