Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621
Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack").
This commit is contained in:
parent
e675ff791d
commit
a1a3f7ffba
@ -211,7 +211,7 @@ public class ItemStack implements ConfigurationSerializable {
|
||||
@Override
|
||||
public ItemStack clone() {
|
||||
ItemStack result = new ItemStack(type, amount, durability);
|
||||
result.addEnchantments(getEnchantments());
|
||||
result.addUnsafeEnchantments(getEnchantments());
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user