From 80e59821f378664be222b7dda99e81fd4c41eb28 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 23 Feb 2012 02:23:05 -0600 Subject: [PATCH] [Bleeding] Fix deserialization for unsafe enchantments. Fixes BUKKIT-793 By: Wesley Wolfe --- paper-api/src/main/java/org/bukkit/inventory/ItemStack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java index 36cb83db40..9118194be2 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -398,7 +398,7 @@ public class ItemStack implements Cloneable, ConfigurationSerializable { Enchantment enchantment = Enchantment.getByName(entry.getKey().toString()); if ((enchantment != null) && (entry.getValue() instanceof Integer)) { - result.addEnchantment(enchantment, (Integer) entry.getValue()); + result.addUnsafeEnchantment(enchantment, (Integer) entry.getValue()); } } }