Fixed issue adding mass enchantments to items

By: Nathan Adams <dinnerbone@dinnerbone.com>
This commit is contained in:
Bukkit/Spigot 2011-11-27 03:58:12 +00:00
parent 636640607d
commit da2c7fcc14

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());
}
}