diff --git a/build.gradle.kts b/build.gradle.kts index 76133b6d..a03fa2d9 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -52,7 +52,7 @@ allprojects { } dependencies { - compileOnly("com.willfp:eco:6.73.0") + compileOnly("com.willfp:eco:6.74.3") compileOnly("org.jetbrains:annotations:23.0.0") compileOnly("org.jetbrains.kotlin:kotlin-stdlib:1.9.20") compileOnly("com.github.ben-manes.caffeine:caffeine:3.1.5") diff --git a/eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_21_3/ModernEnchantmentRegisterer.kt b/eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_21_3/ModernEnchantmentRegisterer.kt index 8e20637d..08cb5d1f 100644 --- a/eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_21_3/ModernEnchantmentRegisterer.kt +++ b/eco-core/core-nms/v1_21_3/src/main/kotlin/com/willfp/ecoenchants/proxy/v1_21_3/ModernEnchantmentRegisterer.kt @@ -7,31 +7,22 @@ import com.willfp.ecoenchants.enchant.registration.modern.ModernEnchantmentRegis import com.willfp.ecoenchants.proxy.v1_21_3.registration.EcoEnchantsCraftEnchantment import com.willfp.ecoenchants.proxy.v1_21_3.registration.ModifiedVanillaCraftEnchantment import com.willfp.ecoenchants.proxy.v1_21_3.registration.vanillaEcoEnchantsEnchantment -import com.willfp.ecoenchants.setStaticFinal -import io.papermc.paper.registry.PaperRegistryAccess -import io.papermc.paper.registry.RegistryAccess -import io.papermc.paper.registry.RegistryKey -import io.papermc.paper.registry.WritableCraftRegistry import net.minecraft.core.Holder import net.minecraft.core.MappedRegistry import net.minecraft.core.Registry -import net.minecraft.core.RegistrySynchronization import net.minecraft.core.registries.Registries -import net.minecraft.resources.ResourceKey import net.minecraft.resources.ResourceLocation -import net.minecraft.world.item.enchantment.Enchantments import org.bukkit.Bukkit import org.bukkit.NamespacedKey import org.bukkit.craftbukkit.CraftRegistry import org.bukkit.craftbukkit.CraftServer import org.bukkit.craftbukkit.util.CraftNamespacedKey import org.bukkit.enchantments.Enchantment -import java.util.HashMap import java.util.IdentityHashMap import java.util.function.BiFunction private val enchantmentRegistry = - (Bukkit.getServer() as CraftServer).server.registryAccess().get(Registries.ENCHANTMENT).get().value() + (Bukkit.getServer() as CraftServer).server.registryAccess().lookupOrThrow(Registries.ENCHANTMENT) @Suppress("DEPRECATION") private val bukkitRegistry = diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/EcoEnchants.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/EcoEnchants.kt index d1e57fac..a221dadd 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/EcoEnchants.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/enchant/EcoEnchants.kt @@ -18,6 +18,7 @@ import com.willfp.ecoenchants.target.EnchantmentTargets import com.willfp.ecoenchants.type.EnchantmentTypes import com.willfp.libreforge.loader.LibreforgePlugin import com.willfp.libreforge.loader.configs.RegistrableCategory +import org.bukkit.Bukkit import org.bukkit.ChatColor import org.bukkit.NamespacedKey import org.bukkit.enchantments.Enchantment