[Bleeding] Cleanup clone method.

By: Wesley Wolfe <weswolf@aol.com>
This commit is contained in:
CraftBukkit/Spigot 2012-02-19 12:52:49 -06:00
parent da4df32343
commit 39944f7043

View file

@ -216,7 +216,11 @@ public class CraftItemStack extends ItemStack {
@Override
public CraftItemStack clone() {
return new CraftItemStack(this.item == null ? this.item : this.item.cloneItemStack());
CraftItemStack itemStack = (CraftItemStack) super.clone();
if (this.item != null) {
itemStack.item = this.item.cloneItemStack();
}
return itemStack;
}
public static net.minecraft.server.ItemStack createNMSItemStack(ItemStack original) {