mirror of
https://github.com/Auxilor/EcoEnchants.git
synced 2024-11-21 14:55:17 +01:00
Fixed again
This commit is contained in:
parent
1c49c32774
commit
f0a05bae45
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user