Fixed issue adding mass enchantments to items

This commit is contained in:
Nathan Adams
2011-11-27 03:58:12 +00:00
parent 514c79f42d
commit 4c8622a306

View File

@@ -258,7 +258,7 @@ public class ItemStack implements Serializable, ConfigurationSerializable {
* @param enchantments Enchantments to add
*/
public void addEnchantments(Map<Enchantment, Integer> enchantments) {
for (Map.Entry<Enchantment, Integer> entry : getEnchantments().entrySet()) {
for (Map.Entry<Enchantment, Integer> 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<Enchantment, Integer> enchantments) {
for (Map.Entry<Enchantment, Integer> entry : getEnchantments().entrySet()) {
for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
addUnsafeEnchantment(entry.getKey(), entry.getValue());
}
}