13
0
geforkt von Mirrors/Paper

Fixed issue adding mass enchantments to items

By: Nathan Adams <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2011-11-27 03:58:12 +00:00
Ursprung 636640607d
Commit da2c7fcc14

Datei anzeigen

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