diff options
author | IlmarsXd <ilmars500@gmail.com> | 2023-02-08 16:21:36 +0200 |
---|---|---|
committer | IlmarsXd <ilmars500@gmail.com> | 2023-02-08 16:21:36 +0200 |
commit | 154f612ed8d866755a227b42d5485d3ac08e1d7c (patch) | |
tree | 6ec2f3c925e67998cdcb5cb223fdd063eabaca6b /src/main/kotlin/dulkirmod/command/FairyCommand.kt | |
parent | 695ca674ce4cd4d7565cbdd08986394d65fac90e (diff) | |
download | DulkirMod-154f612ed8d866755a227b42d5485d3ac08e1d7c.tar.gz DulkirMod-154f612ed8d866755a227b42d5485d3ac08e1d7c.tar.bz2 DulkirMod-154f612ed8d866755a227b42d5485d3ac08e1d7c.zip |
use TextUtils for messages
Diffstat (limited to 'src/main/kotlin/dulkirmod/command/FairyCommand.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/command/FairyCommand.kt | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/main/kotlin/dulkirmod/command/FairyCommand.kt b/src/main/kotlin/dulkirmod/command/FairyCommand.kt index ba7a74b..a6c1b00 100644 --- a/src/main/kotlin/dulkirmod/command/FairyCommand.kt +++ b/src/main/kotlin/dulkirmod/command/FairyCommand.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 FairyCommand : ClientCommandBase("fairy") { @Throws(CommandException::class) override fun processCommand(sender: ICommandSender, args: Array<String>) { - mc.thePlayer.addChatMessage( - ChatComponentText( - EnumChatFormatting.BLUE.toString() + "Healer fairy hider toggled - now: " + - EnumChatFormatting.GREEN + !config.hideHealerFairy - ) - ) config.hideHealerFairy = !config.hideHealerFairy - + TextUtils.toggledMessage("Healer Fairy Hider", config.hideHealerFairy) config.markDirty() config.writeData() } |