diff --git a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantmentManager.kt b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantmentManager.kt index d6c7d46f..ee2a7dd5 100644 --- a/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantmentManager.kt +++ b/eco-core/core-nms/v1_17_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_17_R1/EcoCraftEnchantmentManager.kt @@ -14,6 +14,9 @@ class EcoCraftEnchantmentManager : EcoCraftEnchantmentManagerProxy { val key = org.bukkit.craftbukkit.v1_17_R1.util.CraftNamespacedKey.fromMinecraft( net.minecraft.core.IRegistry.X.getKey(enchant) ) + if (key.key != enchantment.key.key) { + continue + } EcoCraftEnchantment(enchant, maxLevel, conflicts).register() } } diff --git a/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantmentManager.kt b/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantmentManager.kt index 959386be..92559513 100644 --- a/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantmentManager.kt +++ b/eco-core/core-nms/v1_18_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R1/EcoCraftEnchantmentManager.kt @@ -14,6 +14,9 @@ class EcoCraftEnchantmentManager : EcoCraftEnchantmentManagerProxy { val key = org.bukkit.craftbukkit.v1_18_R1.util.CraftNamespacedKey.fromMinecraft( net.minecraft.core.IRegistry.Y.b(enchant) ) + if (key.key != enchantment.key.key) { + continue + } EcoCraftEnchantment(enchant, maxLevel, conflicts).register() } } diff --git a/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantmentManager.kt b/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantmentManager.kt index d0856bff..3c459116 100644 --- a/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantmentManager.kt +++ b/eco-core/core-nms/v1_18_R2/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_18_R2/EcoCraftEnchantmentManager.kt @@ -14,6 +14,9 @@ class EcoCraftEnchantmentManager : EcoCraftEnchantmentManagerProxy { val key = org.bukkit.craftbukkit.v1_18_R2.util.CraftNamespacedKey.fromMinecraft( net.minecraft.core.IRegistry.V.b(enchant) ) + if (key.key != enchantment.key.key) { + continue + } EcoCraftEnchantment(enchant, maxLevel, conflicts).register() } } diff --git a/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt b/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt index 4325112a..ebcd5863 100644 --- a/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt +++ b/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantment.kt @@ -4,7 +4,7 @@ import com.willfp.ecoenchants.enchants.EcoEnchant import com.willfp.ecoenchants.enchants.EcoEnchants import net.minecraft.world.item.enchantment.Enchantment import org.bukkit.NamespacedKey -import org.bukkit.craftbukkit.v1_17_R1.enchantments.CraftEnchantment +import org.bukkit.craftbukkit.v1_19_R1.enchantments.CraftEnchantment class EcoCraftEnchantment( target: Enchantment, diff --git a/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantmentManager.kt b/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantmentManager.kt index 7a02b055..9c40b2a7 100644 --- a/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantmentManager.kt +++ b/eco-core/core-nms/v1_19_R1/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_19_R1/EcoCraftEnchantmentManager.kt @@ -14,6 +14,9 @@ class EcoCraftEnchantmentManager : EcoCraftEnchantmentManagerProxy { val key = org.bukkit.craftbukkit.v1_19_R1.util.CraftNamespacedKey.fromMinecraft( net.minecraft.core.IRegistry.W.b(enchant) ) + if (key.key != enchantment.key.key) { + continue + } EcoCraftEnchantment(enchant, maxLevel, conflicts).register() } }