diff --git a/src/main/java/net/minecraft/server/InventoryPlayer.java b/src/main/java/net/minecraft/server/InventoryPlayer.java index 30d3ca26eb..0ad40a0e40 100644 --- a/src/main/java/net/minecraft/server/InventoryPlayer.java +++ b/src/main/java/net/minecraft/server/InventoryPlayer.java @@ -24,7 +24,11 @@ public class InventoryPlayer implements IInventory { } public ItemStack b() { - return this.a[this.c]; + if (this.c < this.a.length) { + return this.a[this.c]; + } else { + return null; + } } private int d(int i) {