diff --git a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/WatcherTriggers.java b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/WatcherTriggers.java index ccd6759c..2e6cd047 100644 --- a/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/WatcherTriggers.java +++ b/eco-core/core-plugin/src/main/java/com/willfp/ecoenchants/enchantments/util/WatcherTriggers.java @@ -10,6 +10,7 @@ import com.willfp.eco.core.integrations.mcmmo.McmmoManager; import com.willfp.eco.util.TridentUtils; import com.willfp.ecoenchants.EcoEnchantsPlugin; import com.willfp.ecoenchants.enchantments.EcoEnchant; +import com.willfp.ecoenchants.enchantments.EcoEnchants; import org.bukkit.Material; import org.bukkit.block.Block; import org.bukkit.entity.*; @@ -579,7 +580,7 @@ public class WatcherTriggers extends PluginDependent implements Listener { Player player = event.getPlayer(); - this.getPlugin().getScheduler().runLater(() -> EnchantChecks.getEnchantsOnArmor(player).forEach((enchant, integer) -> { + this.getPlugin().getScheduler().runLater(() -> EcoEnchants.values().forEach(enchant -> { if (!enchant.isEnabled()) { return; } @@ -588,7 +589,8 @@ public class WatcherTriggers extends PluginDependent implements Listener { return; } - enchant.onArmorEquip(player, integer, event); + int level = EnchantChecks.getArmorPoints(player, enchant); + enchant.onArmorEquip(player, level, event); }), 1); }