From 88a306e7e2d09bbcecc4f58471311f0741cf9235 Mon Sep 17 00:00:00 2001 From: Auxilor Date: Sun, 19 Mar 2023 18:06:05 +0000 Subject: [PATCH] Registered player refresh function --- .../main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt index 2d5bc8cd..4cc40d7e 100644 --- a/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt +++ b/eco-core/core-plugin/src/main/kotlin/com/willfp/ecoenchants/EcoEnchantsPlugin.kt @@ -21,10 +21,12 @@ import com.willfp.ecoenchants.mechanics.EnchantingTableSupport import com.willfp.ecoenchants.mechanics.GrindstoneSupport import com.willfp.ecoenchants.mechanics.LootSupport import com.willfp.ecoenchants.mechanics.VillagerSupport +import com.willfp.ecoenchants.target.EnchantLookup.clearEnchantCache import com.willfp.ecoenchants.target.EnchantLookup.heldEnchantLevels import com.willfp.libreforge.loader.LibreforgePlugin import com.willfp.libreforge.loader.configs.ConfigCategory import com.willfp.libreforge.registerHolderProvider +import com.willfp.libreforge.registerPlayerRefreshFunction import org.bukkit.event.Listener class EcoEnchantsPlugin : LibreforgePlugin() { @@ -47,6 +49,7 @@ class EcoEnchantsPlugin : LibreforgePlugin() { override fun handleEnable() { registerHolderProvider { it.heldEnchantLevels } + registerPlayerRefreshFunction { it.clearEnchantCache() } } override fun handleAfterLoad() {