diff options
author | inglettronald <inglettronald@gmail.com> | 2023-05-09 00:19:57 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-05-09 00:19:57 -0500 |
commit | dac450a6bf943cd08d1acf91f64997f9644c0a57 (patch) | |
tree | 5c964ce2d6ff236b1e0c3f3a014dc09842e62f9e /src/main/kotlin/dulkirmod/DulkirMod.kt | |
parent | 4cf5ea047f6fec2fab562fd4f99a08b165cabbb3 (diff) | |
download | DulkirMod-dac450a6bf943cd08d1acf91f64997f9644c0a57.tar.gz DulkirMod-dac450a6bf943cd08d1acf91f64997f9644c0a57.tar.bz2 DulkirMod-dac450a6bf943cd08d1acf91f64997f9644c0a57.zip |
Added Dynamic Command Key code
Diffstat (limited to 'src/main/kotlin/dulkirmod/DulkirMod.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/DulkirMod.kt | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/main/kotlin/dulkirmod/DulkirMod.kt b/src/main/kotlin/dulkirmod/DulkirMod.kt index 91335f9..6cf8251 100644 --- a/src/main/kotlin/dulkirmod/DulkirMod.kt +++ b/src/main/kotlin/dulkirmod/DulkirMod.kt @@ -41,18 +41,20 @@ class DulkirMod { fun preInit(event: FMLPreInitializationEvent) { val directory = File(event.modConfigurationDirectory, "dulkirmod") directory.mkdirs() + val cch = ClientCommandHandler.instance // REGISTER COMMANDS HERE // Help Commands - ClientCommandHandler.instance.registerCommand(HelpCommand()) + cch.registerCommand(HelpCommand()) // General - ClientCommandHandler.instance.registerCommand(EnchantRuneCommand()) - ClientCommandHandler.instance.registerCommand(FairyCommand()) - ClientCommandHandler.instance.registerCommand(SettingsCommand()) - ClientCommandHandler.instance.registerCommand(JoinDungeonCommand()) - ClientCommandHandler.instance.registerCommand(LeapNameCommand()) - ClientCommandHandler.instance.registerCommand(HurtCamCommand()) - ClientCommandHandler.instance.registerCommand(FarmingControlSchemeCommand()) + cch.registerCommand(EnchantRuneCommand()) + cch.registerCommand(FairyCommand()) + cch.registerCommand(SettingsCommand()) + cch.registerCommand(JoinDungeonCommand()) + cch.registerCommand(LeapNameCommand()) + cch.registerCommand(HurtCamCommand()) + cch.registerCommand(FarmingControlSchemeCommand()) + cch.registerCommand(DynamicKeyCommand()) } @Mod.EventHandler @@ -122,6 +124,9 @@ class DulkirMod { if (keyBinds[2].isPressed) { FarmingControlSchemeCommand.toggleControls(); } + if (keyBinds[3].isPressed) { + TextUtils.sendMessage("/${DulkirConfig.dynamicCommandString}") + } } companion object { @@ -138,7 +143,8 @@ class DulkirMod { val keyBinds = arrayOf( KeyBinding("Open Settings", Keyboard.KEY_RSHIFT, "Dulkir Mod"), KeyBinding("Toggle Selfie Setting", Keyboard.KEY_NONE, "Dulkir Mod"), - KeyBinding("Toggle Farming Controls", Keyboard.KEY_NONE, "Dulkir Mod") + KeyBinding("Toggle Farming Controls", Keyboard.KEY_NONE, "Dulkir Mod"), + KeyBinding("Dynamic Key", Keyboard.KEY_NONE, "Dulkir Mod") ) } |