Fixed GUI
This commit is contained in:
@@ -2,6 +2,7 @@ package com.willfp.boosters.boosters
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableList
|
import com.google.common.collect.ImmutableList
|
||||||
import com.willfp.boosters.BoostersPlugin
|
import com.willfp.boosters.BoostersPlugin
|
||||||
|
import com.willfp.boosters.gui.BoosterGUI
|
||||||
import com.willfp.eco.core.config.interfaces.Config
|
import com.willfp.eco.core.config.interfaces.Config
|
||||||
import com.willfp.eco.core.registry.Registry
|
import com.willfp.eco.core.registry.Registry
|
||||||
import com.willfp.libreforge.loader.LibreforgePlugin
|
import com.willfp.libreforge.loader.LibreforgePlugin
|
||||||
@@ -45,4 +46,8 @@ object Boosters : ConfigCategory("booster", "boosters") {
|
|||||||
override fun acceptConfig(plugin: LibreforgePlugin, id: String, config: Config) {
|
override fun acceptConfig(plugin: LibreforgePlugin, id: String, config: Config) {
|
||||||
registry.register(Booster(plugin as BoostersPlugin, id, config))
|
registry.register(Booster(plugin as BoostersPlugin, id, config))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override fun afterReload(plugin: LibreforgePlugin) {
|
||||||
|
BoosterGUI.update(plugin as BoostersPlugin)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,9 +48,7 @@ object BoosterGUI {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@JvmStatic
|
internal fun update(plugin: BoostersPlugin) {
|
||||||
@ConfigUpdater
|
|
||||||
fun update(plugin: BoostersPlugin) {
|
|
||||||
gui = menu(plugin.configYml.getInt("gui.rows")) {
|
gui = menu(plugin.configYml.getInt("gui.rows")) {
|
||||||
setMask(
|
setMask(
|
||||||
FillerMask(
|
FillerMask(
|
||||||
|
|||||||
@@ -6,3 +6,4 @@ options:
|
|||||||
resource-id: 2036
|
resource-id: 2036
|
||||||
bstats-id: 14269
|
bstats-id: 14269
|
||||||
color: "&e"
|
color: "&e"
|
||||||
|
uses-reflective-reload: false
|
||||||
|
|||||||
Reference in New Issue
Block a user