mirror of
https://github.com/nulli0n/ExcellentEnchants-spigot.git
synced 2024-11-10 09:49:49 +01:00
Fixed charges check for passive enchants
This commit is contained in:
parent
6cdd7b7dfc
commit
3c0473330e
@ -344,6 +344,7 @@ public class EnchantManager extends AbstractManager<ExcellentEnchants> {
|
||||
EnchantManager.getEquippedEnchants(entity, PassiveEnchant.class).forEach((item, enchants) -> {
|
||||
enchants.forEach((enchant, level) -> {
|
||||
if (enchant instanceof Potioned potioned) {
|
||||
if (enchant.isOutOfCharges(item)) return;
|
||||
if (enchant.onTrigger(entity, item, level)) {
|
||||
enchant.consumeCharges(item);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user