diff --git a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/ModifiedVanillaCraftEnchantment.kt b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/ModifiedVanillaCraftEnchantment.kt index 23c30eff..2aed4392 100644 --- a/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/ModifiedVanillaCraftEnchantment.kt +++ b/eco-core/core-nms/v1_20_R3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_20_R3/registration/ModifiedVanillaCraftEnchantment.kt @@ -12,7 +12,12 @@ class ModifiedVanillaCraftEnchantment( override fun getMaxLevel(): Int = this.vanillaEnchantmentData?.maxLevel ?: super.getMaxLevel() override fun conflictsWith(other: org.bukkit.enchantments.Enchantment): Boolean { + val otherConflicts = when(other) { + is ModifiedVanillaCraftEnchantment -> other.vanillaEnchantmentData?.conflicts?.contains(this.key) == true + else -> other.conflictsWith(this) + } + return this.vanillaEnchantmentData?.conflicts?.contains(other.key) ?: super.conflictsWith(other) - || other.conflictsWith(this) + || otherConflicts } }