Fixed proxies

This commit is contained in:
Auxilor 2022-08-30 00:02:41 +01:00
parent 924d42b96e
commit 1fd54faa04
5 changed files with 13 additions and 1 deletions

View File

@ -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()
}
}

View File

@ -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()
}
}

View File

@ -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()
}
}

View File

@ -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,

View File

@ -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()
}
}