From da2c7fcc14801e67425ca8a6590342f8f9bc1a85 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 27 Nov 2011 03:58:12 +0000 Subject: [PATCH] Fixed issue adding mass enchantments to items By: Nathan Adams --- paper-api/src/main/java/org/bukkit/inventory/ItemStack.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 f7f41b39c8..3a1fbace94 100644 --- a/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java +++ b/paper-api/src/main/java/org/bukkit/inventory/ItemStack.java @@ -258,7 +258,7 @@ public class ItemStack implements Serializable, ConfigurationSerializable { * @param enchantments Enchantments to add */ public void addEnchantments(Map enchantments) { - for (Map.Entry entry : getEnchantments().entrySet()) { + for (Map.Entry entry : enchantments.entrySet()) { addEnchantment(entry.getKey(), entry.getValue()); } } @@ -290,7 +290,7 @@ public class ItemStack implements Serializable, ConfigurationSerializable { * @param enchantments Enchantments to add */ public void addUnsafeEnchantments(Map enchantments) { - for (Map.Entry entry : getEnchantments().entrySet()) { + for (Map.Entry entry : enchantments.entrySet()) { addUnsafeEnchantment(entry.getKey(), entry.getValue()); } }