Fixed enchantment guis not updating on reload

This commit is contained in:
Will FP 2024-11-04 11:07:17 +00:00
parent 42e7fae0dc
commit 832079a493

View File

@ -40,6 +40,9 @@ object EnchantGUI {
private val enchantInfoMenus = Caffeine.newBuilder().build<EcoEnchant, Menu>() private val enchantInfoMenus = Caffeine.newBuilder().build<EcoEnchant, Menu>()
internal fun reload(plugin: EcoEnchantsPlugin) { internal fun reload(plugin: EcoEnchantsPlugin) {
cachedEnchantmentSlots.invalidateAll()
enchantInfoMenus.invalidateAll()
menu = menu(plugin.configYml.getInt("enchant-gui.rows")) { menu = menu(plugin.configYml.getInt("enchant-gui.rows")) {
title = plugin.configYml.getFormattedString("enchant-gui.title") title = plugin.configYml.getFormattedString("enchant-gui.title")