Fixed Vanilla Enchantment#conflictsWith behaviour being incorrectly overridden

This commit is contained in:
Auxilor 2021-06-30 09:44:37 +01:00
parent 296d52e4e7
commit 1cfe3cc179
4 changed files with 4 additions and 4 deletions

View File

@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment {
@Override
public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) {
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other);
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this);
}
public void register() {

View File

@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment {
@Override
public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) {
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other);
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this);
}
public void register() {

View File

@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment {
@Override
public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) {
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other);
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this);
}
public void register() {

View File

@ -23,7 +23,7 @@ public class EcoCraftEnchantment extends CraftEnchantment {
@Override
public boolean conflictsWith(@NotNull final org.bukkit.enchantments.Enchantment other) {
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(other);
return EcoEnchants.getFromEnchantment(other) == null ? super.conflictsWith(other) : other.conflictsWith(this);
}
public void register() {