mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-23 08:41:27 +01:00
Allow cloning ItemStacks with unsafe enchantments. Fixes BUKKIT-621
Prevents "IllegalArgumentException: Specified enchantment cannot be applied to this itemstack"). By: mushroomhostage <mushroomhostage@yahoo.com>
This commit is contained in:
parent
b7a973b822
commit
e204abd0f0
@ -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…
Reference in New Issue
Block a user