Fix reload command not executing the config event.

Also lazy loading of config guis.
This commit is contained in:
alexcrea 2024-07-23 04:08:55 +02:00
parent e39bee5952
commit 03ae19e8a7
No known key found for this signature in database
GPG key ID: 43FD265DB0DBF91F
10 changed files with 109 additions and 32 deletions

View file

@ -128,6 +128,10 @@ class CustomAnvil : JavaPlugin() {
// temporary: handle 1.21 update
Update_1_21.handleUpdate()
// Register enchantment of compatible plugin and load configuration change.
DependencyManager.handleCompatibilityConfig()
// Call config event
val configReadyEvent = CAConfigReadyEvent()
server.pluginManager.callEvent(configReadyEvent)
@ -135,8 +139,6 @@ class CustomAnvil : JavaPlugin() {
MainConfigGui.getInstance().init(DependencyManager.packetManager)
GuiSharedConstant.loadConstants()
// Register enchantment of compatible plugin and load configuration change.
DependencyManager.handleCompatibilityConfig()
}
fun reloadResource(