From 74d746b6c5d9cfeb50cbc62144a84fdcd164058e Mon Sep 17 00:00:00 2001 From: sk89q Date: Sun, 16 Jan 2011 13:29:30 -0800 Subject: [PATCH] Fixed error in CraftInventory.setContents(). --- .../java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 8b7c06b16b..26b090861a 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -50,7 +50,7 @@ public class CraftInventory implements org.bukkit.inventory.Inventory { for (int i = 0; i < items.length; i++ ) { ItemStack item = items[i]; - if (item == null) { + if (item == null || item.getTypeId() <= 0) { mcItems[i] = null; } else { mcItems[i] = new net.minecraft.server.ItemStack( item.getTypeId(), item.getAmount(), item.getDamage());