From 154f612ed8d866755a227b42d5485d3ac08e1d7c Mon Sep 17 00:00:00 2001 From: IlmarsXd Date: Wed, 8 Feb 2023 16:21:36 +0200 Subject: use TextUtils for messages --- src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt') diff --git a/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt b/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt index 40cdc6c..36e8b69 100644 --- a/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt +++ b/src/main/kotlin/dulkirmod/command/EnchantRuneCommand.kt @@ -1,23 +1,15 @@ package dulkirmod.command import dulkirmod.DulkirMod.Companion.config -import dulkirmod.DulkirMod.Companion.mc +import dulkirmod.utils.TextUtils import net.minecraft.command.CommandException import net.minecraft.command.ICommandSender -import net.minecraft.util.ChatComponentText -import net.minecraft.util.EnumChatFormatting class EnchantRuneCommand : ClientCommandBase("enchantrune") { @Throws(CommandException::class) override fun processCommand(sender: ICommandSender, args: Array) { - mc.thePlayer.addChatMessage( - ChatComponentText( - EnumChatFormatting.BLUE.toString() + "" + "Enchant rune hider toggled - now: " + - EnumChatFormatting.GREEN + !config.hideEnchantRune - ) - ) config.hideEnchantRune = !config.hideEnchantRune - + TextUtils.toggledMessage("Enchant Rune Hider", config.hideEnchantRune) config.markDirty() config.writeData() } -- cgit