Fixed again

This commit is contained in:
Auxilor 2023-12-20 13:17:49 +00:00
parent 1c49c32774
commit f0a05bae45

View File

@ -36,6 +36,13 @@ object LegacyEnchantmentRegisterer : EnchantmentRegisterer {
}
override fun register(enchant: EcoEnchantBase): Enchantment {
// Allow registering new enchantments
Enchantment::class.java.getDeclaredField("acceptingNew")
.apply {
isAccessible = true
set(null, true)
}
val enchantment = LegacyDelegatedEnchantment(enchant)
Enchantment.registerEnchantment(enchantment)