CraftItemStack: Make sure this.item is not null when cloning.

Fixes BUKKIT-424

By: Andrew Ardill <andrew.ardill@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2011-12-29 22:31:55 +11:00
parent b0ac365f5e
commit 06fe4d6b9a

View file

@ -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) {