Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621

Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack").
This commit is contained in:
mushroomhostage
2012-02-10 17:53:22 -08:00
committed by EvilSeph
parent a688096fc5
commit c634d7acdb

View File

@@ -211,7 +211,7 @@ public class ItemStack implements ConfigurationSerializable {
@Override @Override
public ItemStack clone() { public ItemStack clone() {
ItemStack result = new ItemStack(type, amount, durability); ItemStack result = new ItemStack(type, amount, durability);
result.addEnchantments(getEnchantments()); result.addUnsafeEnchantments(getEnchantments());
return result; return result;
} }