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);