mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-22 15:05:18 +01:00
Added AntigriefManager support to Corrosive enchantment
This commit is contained in:
parent
f164b76c62
commit
c538a007da
@ -1,5 +1,6 @@
|
||||
package com.willfp.ecoenchants.enchantments.ecoenchants.normal;
|
||||
|
||||
import com.willfp.eco.core.integrations.antigrief.AntigriefManager;
|
||||
import com.willfp.eco.util.DurabilityUtils;
|
||||
import com.willfp.ecoenchants.enchantments.EcoEnchant;
|
||||
import com.willfp.ecoenchants.enchantments.meta.EnchantmentType;
|
||||
@ -30,6 +31,12 @@ public class Corrosive extends EcoEnchant {
|
||||
return;
|
||||
}
|
||||
|
||||
if (attacker instanceof Player player) {
|
||||
if (!AntigriefManager.canInjure(player, uncastVictim)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList<ItemStack> armor = new ArrayList<>(Arrays.asList(victim.getInventory().getArmorContents()));
|
||||
if (armor.isEmpty()) {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user