From 5d5a80286b2cef902fcf31937a660eb101ca4e1a Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 20 Dec 2023 12:14:17 +0000 Subject: [PATCH 1/2] Fixed legacy registration --- .../registration/legacy/LegacyEnchantmentRegisterer.kt | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/registration/legacy/LegacyEnchantmentRegisterer.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/registration/legacy/LegacyEnchantmentRegisterer.kt index d19eeba798..cc2888b940 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/registration/legacy/LegacyEnchantmentRegisterer.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/registration/legacy/LegacyEnchantmentRegisterer.kt @@ -8,19 +8,17 @@ import org.bukkit.enchantments.Enchantment @Suppress("UNCHECKED_CAST") object LegacyEnchantmentRegisterer : EnchantmentRegisterer { - init { + /** + * Register an enchantment to bukkit (for replacing vanilla CraftEnchantments) + */ + fun registerToBukkit(enchantment: Enchantment) { // Allow registering new enchantments Enchantment::class.java.getDeclaredField("acceptingNew") .apply { isAccessible = true set(null, true) } - } - /** - * Register an enchantment to bukkit (for replacing vanilla CraftEnchantments) - */ - fun registerToBukkit(enchantment: Enchantment) { Enchantment::class.java.getDeclaredField("byKey") .apply { isAccessible = true From 1c49c327743455135ce182dca16e5fc4c837eab4 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Wed, 20 Dec 2023 12:14:32 +0000 Subject: [PATCH 2/2] Updated to 11.0.4 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index b3d5544e64..dfb96c34f3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,4 +2,4 @@ #Sun Dec 03 16:00:06 GMT 2023 kotlin.code.style=official libreforge-version=4.49.2 -version=11.0.3 +version=11.0.4