Fixed GUI

This commit is contained in:
Auxilor
2023-05-02 15:24:00 +01:00
parent 6720c37bf4
commit f998a78aae
3 changed files with 7 additions and 3 deletions

View File

@@ -2,6 +2,7 @@ package com.willfp.boosters.boosters
import com.google.common.collect.ImmutableList
import com.willfp.boosters.BoostersPlugin
import com.willfp.boosters.gui.BoosterGUI
import com.willfp.eco.core.config.interfaces.Config
import com.willfp.eco.core.registry.Registry
import com.willfp.libreforge.loader.LibreforgePlugin
@@ -45,4 +46,8 @@ object Boosters : ConfigCategory("booster", "boosters") {
override fun acceptConfig(plugin: LibreforgePlugin, id: String, config: Config) {
registry.register(Booster(plugin as BoostersPlugin, id, config))
}
override fun afterReload(plugin: LibreforgePlugin) {
BoosterGUI.update(plugin as BoostersPlugin)
}
}

View File

@@ -48,9 +48,7 @@ object BoosterGUI {
}
}
@JvmStatic
@ConfigUpdater
fun update(plugin: BoostersPlugin) {
internal fun update(plugin: BoostersPlugin) {
gui = menu(plugin.configYml.getInt("gui.rows")) {
setMask(
FillerMask(

View File

@@ -6,3 +6,4 @@ options:
resource-id: 2036
bstats-id: 14269
color: "&e"
uses-reflective-reload: false