diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantChecks.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantChecks.java index a84ce2da..e3fc575e 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantChecks.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/EnchantChecks.java @@ -306,13 +306,11 @@ public class EnchantChecks { return new HashMap<>(); } - List armor = Arrays.asList(entity.getEquipment().getArmorContents()); - Map ecoEnchants = new HashMap<>(); - armor.forEach((itemStack -> { + for (ItemStack itemStack : entity.getEquipment().getArmorContents()) { ecoEnchants.putAll(EnchantChecks.getEnchantsOnItem(itemStack)); - })); + } return ecoEnchants; }