From 39b417df5dbad8093f3bef3793f2a9b240eaf9ca Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 6 Apr 2011 12:45:03 -0400 Subject: [PATCH] getContents now returns null for items whose underlying item is null By: Tahg --- .../java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index a54b795630..822a250f4a 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -35,7 +35,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory { net.minecraft.server.ItemStack[] mcItems = getInventory().getContents(); for (int i = 0; i < mcItems.length; i++ ) { - items[i] = new CraftItemStack(mcItems[i]); + items[i] = mcItems[i] == null ? null : new CraftItemStack(mcItems[i]); } return items;