diff --git a/src/main/java/me/zeroeightsix/kami/KamiMod.java b/src/main/java/me/zeroeightsix/kami/KamiMod.java index cbe2b060..8d3b3b45 100644 --- a/src/main/java/me/zeroeightsix/kami/KamiMod.java +++ b/src/main/java/me/zeroeightsix/kami/KamiMod.java @@ -122,7 +122,7 @@ public class KamiMod { @Mod.EventHandler public void postInit(FMLPostInitializationEvent event) { setCustomIcons(); - if (MODULE_MANAGER.getModuleT(CommandConfig.class).customTitle.getValue()) { + if (MODULE_MANAGER.getModuleT(CommandConfig.class).windowTitle.getValue()) { Display.setTitle(MODNAME + " " + KAMI_KANJI + " " + MODVERSMALL); } } diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/client/CommandConfig.java b/src/main/java/me/zeroeightsix/kami/module/modules/client/CommandConfig.java new file mode 100644 index 00000000..c659ed46 --- /dev/null +++ b/src/main/java/me/zeroeightsix/kami/module/modules/client/CommandConfig.java @@ -0,0 +1,29 @@ +package me.zeroeightsix.kami.module.modules.client; + +import me.zeroeightsix.kami.module.Module; +import me.zeroeightsix.kami.setting.Setting; +import me.zeroeightsix.kami.setting.Settings; + +import static me.zeroeightsix.kami.KamiMod.MODULE_MANAGER; +import static me.zeroeightsix.kami.util.MessageSendHelper.sendErrorMessage; + +/** + * @author dominikaaaa + */ +@Module.Info( + name = "CommandConfig", + category = Module.Category.CLIENT, + description = "Configures PrefixChat and Alias options", + showOnArray = Module.ShowOnArray.OFF +) +public class CommandConfig extends Module { + public Setting aliasInfo = register(Settings.b("Alias Info", true)); + public Setting prefixChat = register(Settings.b("PrefixChat", true)); + public Setting windowTitle = register(Settings.b("Window Title", true)); + public void onDisable() { sendDisableMessage(this.getClass()); } + + private void sendDisableMessage(Class clazz) { + sendErrorMessage("Error: The " + MODULE_MANAGER.getModule(clazz).getName() + " module is only for configuring command options, disabling it doesn't do anything."); + MODULE_MANAGER.getModule(clazz).enable(); + } +} diff --git a/src/main/java/me/zeroeightsix/kami/module/modules/client/CommandConfig.kt b/src/main/java/me/zeroeightsix/kami/module/modules/client/CommandConfig.kt deleted file mode 100644 index f8178a96..00000000 --- a/src/main/java/me/zeroeightsix/kami/module/modules/client/CommandConfig.kt +++ /dev/null @@ -1,34 +0,0 @@ -package me.zeroeightsix.kami.module.modules.client - -import me.zeroeightsix.kami.KamiMod -import me.zeroeightsix.kami.module.Module -import me.zeroeightsix.kami.setting.Setting -import me.zeroeightsix.kami.setting.Settings -import me.zeroeightsix.kami.util.MessageSendHelper - -/** - * @author dominikaaaa - */ -@Module.Info( - name = "CommandConfig", - category = Module.Category.CLIENT, - description = "Configures PrefixChat and Alias options", - showOnArray = Module.ShowOnArray.OFF -) -class CommandConfig : Module() { - @JvmField - var aliasInfo: Setting = register(Settings.b("Alias Info", true)) - @JvmField - var prefixChat: Setting = register(Settings.b("PrefixChat", true)) - @JvmField - var customTitle: Setting = register(Settings.b("Window Title", true)) - - public override fun onDisable() { - sendDisableMessage() - } - - private fun sendDisableMessage() { - MessageSendHelper.sendErrorMessage("Error: The " + KamiMod.MODULE_MANAGER.getModule(this.javaClass).name + " module is only for configuring command options, disabling it doesn't do anything.") - KamiMod.MODULE_MANAGER.getModule(this.javaClass).enable() - } -} \ No newline at end of file