conflictsWith now checks two ways

This commit is contained in:
Auxilor 2021-03-19 16:52:31 +00:00
parent f0a72b5806
commit 699d4b1e98

View File

@ -363,6 +363,9 @@ public abstract class EcoEnchant extends Enchantment implements Listener, Watche
*/ */
@Override @Override
public boolean conflictsWith(@NotNull final Enchantment enchantment) { public boolean conflictsWith(@NotNull final Enchantment enchantment) {
if (enchantment instanceof EcoEnchant) {
return conflicts.contains(enchantment) || ((EcoEnchant) enchantment).conflicts.contains(this);
}
return conflicts.contains(enchantment); return conflicts.contains(enchantment);
} }