Reverted invalid clone. Fixes BUKKIT-1198

By: Celtic Minstrel <celtic.minstrel.ca@some.place>
This commit is contained in:
CraftBukkit/Spigot 2012-03-16 15:46:46 -04:00
parent 344f7d09a2
commit e1b4d5f3ae

View file

@ -266,7 +266,7 @@ public class CraftInventory implements Inventory {
} else {
// More than a single stack!
if (item.getAmount() > getMaxItemStack()) {
CraftItemStack stack = new CraftItemStack(item);
CraftItemStack stack = new CraftItemStack(item.getTypeId(), getMaxItemStack(), item.getDurability());
stack.addUnsafeEnchantments(item.getEnchantments());
setItem(firstFree, stack);
item.setAmount(item.getAmount() - getMaxItemStack());