From 06fe4d6b9ad6c3428208e91624e8608b501b20fa Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 29 Dec 2011 22:31:55 +1100 Subject: [PATCH] CraftItemStack: Make sure this.item is not null when cloning. Fixes BUKKIT-424 By: Andrew Ardill --- .../java/org/bukkit/craftbukkit/inventory/CraftItemStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java index c0854276d1..b1bde111a9 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/paper-server/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) {