diff options
author | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-03-25 04:36:31 -0500 |
commit | 43d07fc791e63bba61695e0d4b766b78eb699132 (patch) | |
tree | 69111eb055f0e68fdf388046fb0812f4f3f2f004 /src/main/kotlin/dulkirmod/command | |
parent | 71af70d22e9a55a58c36642a745e81aa91851375 (diff) | |
download | DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.gz DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.tar.bz2 DulkirMod-43d07fc791e63bba61695e0d4b766b78eb699132.zip |
Config Syntax Change and switch to oneconfig
Diffstat (limited to 'src/main/kotlin/dulkirmod/command')
7 files changed, 13 insertions, 15 deletions
diff --git a/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt b/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt index 36e8b69..7b489e7 100644 --- a/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt +++ b/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt @@ -10,7 +10,6 @@ class EnchantRuneCommand : ClientCommandBase("enchantrune") { override fun processCommand(sender: ICommandSender, args: Array<String>) { config.hideEnchantRune = !config.hideEnchantRune TextUtils.toggledMessage("Enchant Rune Hider", config.hideEnchantRune) - config.markDirty() - config.writeData() + config.save() } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/command/FairyCommand.kt b/src/main/kotlin/dulkirmod/command/FairyCommand.kt index a6c1b00..b8231b7 100644 --- a/src/main/kotlin/dulkirmod/command/FairyCommand.kt +++ b/src/main/kotlin/dulkirmod/command/FairyCommand.kt @@ -10,7 +10,6 @@ class FairyCommand : ClientCommandBase("fairy") { override fun processCommand(sender: ICommandSender, args: Array<String>) { config.hideHealerFairy = !config.hideHealerFairy TextUtils.toggledMessage("Healer Fairy Hider", config.hideHealerFairy) - config.markDirty() - config.writeData() + config.save() } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt b/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt index 8bbad18..5d67fb3 100644 --- a/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt +++ b/src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TextUtils import net.minecraft.client.Minecraft import net.minecraft.client.settings.KeyBinding @@ -38,7 +38,7 @@ class FarmingControlSchemeCommand : ClientCommandBase("farmcontrols") { KeyBinding.setKeyBindState(jumpKey.keyCode, false) jumpKey.keyCode = 57 // 57 = space key code - minecraft.gameSettings.mouseSensitivity = Config.defaultSens / 2 + minecraft.gameSettings.mouseSensitivity = DulkirConfig.defaultSens / 2 } // Save the changes to the control settings diff --git a/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt b/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt index 200fa22..21d2e7e 100644 --- a/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt +++ b/src/main/kotlin/dulkirmod/command/HurtCamCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException import net.minecraft.command.ICommandSender @@ -8,7 +8,7 @@ import net.minecraft.command.ICommandSender class HurtCamCommand : ClientCommandBase("ouch") { @Throws(CommandException::class) override fun processCommand(sender: ICommandSender, args: Array<String>) { - Config.hurtCamIntensity = 7f + DulkirConfig.hurtCamIntensity = 7f TextUtils.info("§6§lOUCH! THAT HURT!") } }
\ No newline at end of file diff --git a/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt b/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt index f6f5a5e..d5e58c4 100644 --- a/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt +++ b/src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException import net.minecraft.command.ICommandSender @@ -24,7 +24,7 @@ class JoinDungeonCommand : ClientCommandBase("joindungeon") { } } catch (_: NumberFormatException) {} - if (Config.dungeonCommandConfirm) { + if (DulkirConfig.dungeonCommandConfirm) { TextUtils.info("§6Running command: $type$num") } TextUtils.sendMessage("/joindungeon $arguments") diff --git a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt index f4a86a9..d564acd 100644 --- a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt +++ b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt @@ -1,6 +1,6 @@ package dulkirmod.command -import dulkirmod.config.Config +import dulkirmod.config.DulkirConfig import dulkirmod.utils.TabListUtils import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException @@ -26,7 +26,7 @@ class LeapNameCommand : ClientCommandBase("hl") { else -> findUserNameFor(username, false) } if (foundPlayer) { - TextUtils.info("§6Selected Leap Highlight for username: §f${Config.highlightLeapName}§6.") + TextUtils.info("§6Selected Leap Highlight for username: §f${DulkirConfig.highlightLeapName}§6.") } } private fun findUserNameFor(input: String, isClassName: Boolean): Boolean { @@ -37,7 +37,7 @@ class LeapNameCommand : ClientCommandBase("hl") { for (l in scoreboardList) { if (l.contains(input)) { val strArr = l.split(" ") - Config.highlightLeapName = strArr[1] + DulkirConfig.highlightLeapName = strArr[1] return true } } @@ -51,7 +51,7 @@ class LeapNameCommand : ClientCommandBase("hl") { if (strArr.size < 2) continue val username = strArr[1] if (username.lowercase() == input.lowercase()) { - Config.highlightLeapName = username + DulkirConfig.highlightLeapName = username return true } } diff --git a/src/main/kotlin/dulkirmod/command/SettingsCommand.kt b/src/main/kotlin/dulkirmod/command/SettingsCommand.kt index 5f16652..9fa6964 100644 --- a/src/main/kotlin/dulkirmod/command/SettingsCommand.kt +++ b/src/main/kotlin/dulkirmod/command/SettingsCommand.kt @@ -5,6 +5,6 @@ import net.minecraft.command.ICommandSender class SettingsCommand : ClientCommandBase("dulkir") { override fun processCommand(sender: ICommandSender?, args: Array<out String>?) { - DulkirMod.display = DulkirMod.config.gui() + DulkirMod.config.openGui() } }
\ No newline at end of file |