aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/command
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/dulkirmod/command')
-rw-r--r--src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt3
-rw-r--r--src/main/kotlin/dulkirmod/command/FairyCommand.kt3
-rw-r--r--src/main/kotlin/dulkirmod/command/FarmingControlSchemeCommand.kt4
-rw-r--r--src/main/kotlin/dulkirmod/command/HurtCamCommand.kt4
-rw-r--r--src/main/kotlin/dulkirmod/command/JoinDungeonCommand.kt4
-rw-r--r--src/main/kotlin/dulkirmod/command/LeapNameCommand.kt8
-rw-r--r--src/main/kotlin/dulkirmod/command/SettingsCommand.kt2
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