From 8443a6add25f7e6fa1ef6837274079a4b1676a94 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Tue, 13 Apr 2021 18:25:01 +0100 Subject: [PATCH] Cleaned EnchantChecks --- .../willfp/ecoenchants/enchantments/util/EnchantChecks.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; }