From ff4f0099dc821de12527d0b0ef44d46f4b7a5a37 Mon Sep 17 00:00:00 2001 From: Rolando Islas Date: Tue, 31 Jan 2017 03:17:02 -0700 Subject: [PATCH] #11 --- src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java b/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java index 07e3467..47b0cf8 100644 --- a/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java +++ b/src/main/java/com/rolandoislas/multihotbar/HotbarLogic.java @@ -301,6 +301,8 @@ public void pickupEvent(EntityItemPickupEvent event) { return; // Check if compatible stack is in inventory EntityPlayer player = Minecraft.getMinecraft().player; + if (player == null) + return; int slot = getFirstCompatibleStack(event.getItem().getEntityItem()); if (slot >= 0) { ItemStack stack = player.inventory.getStackInSlot(slot);