From 60a2d1225058f6fe8123f182463e317a328b89a5 Mon Sep 17 00:00:00 2001 From: Andrew Ardill Date: Thu, 29 Dec 2011 22:31:55 +1100 Subject: [PATCH] CraftItemStack: Make sure this.item is not null when cloning. Fixes BUKKIT-424 --- .../java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index c0854276d1..b1bde111a9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -212,7 +212,7 @@ public class CraftItemStack extends ItemStack { @Override public CraftItemStack clone() { - return new CraftItemStack(this.item.cloneItemStack()); + return new CraftItemStack(this.item == null ? this.item : this.item.cloneItemStack()); } public static net.minecraft.server.ItemStack createNMSItemStack(ItemStack original) {