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/HelpCommand.kt | 28 +++++------------------- 1 file changed, 5 insertions(+), 23 deletions(-) (limited to 'src/main/kotlin/dulkirmod/command/HelpCommand.kt') diff --git a/src/main/kotlin/dulkirmod/command/HelpCommand.kt b/src/main/kotlin/dulkirmod/command/HelpCommand.kt index 0180fac..2b7a9b0 100644 --- a/src/main/kotlin/dulkirmod/command/HelpCommand.kt +++ b/src/main/kotlin/dulkirmod/command/HelpCommand.kt @@ -1,33 +1,15 @@ package dulkirmod.command -import net.minecraft.client.Minecraft +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 HelpCommand : ClientCommandBase("dulkirhelp") { @Throws(CommandException::class) override fun processCommand(sender: ICommandSender, args: Array) { - Minecraft.getMinecraft().thePlayer.addChatMessage( - ChatComponentText( - EnumChatFormatting.GOLD.toString() + "" + EnumChatFormatting.BOLD + " HI THIS IS DULKIRMOD!" - ) - ) - Minecraft.getMinecraft().thePlayer.addChatMessage( - ChatComponentText( - EnumChatFormatting.GRAY.toString() + "/enchantrune - toggles enchant rune visibility." - ) - ) - Minecraft.getMinecraft().thePlayer.addChatMessage( - ChatComponentText( - EnumChatFormatting.GRAY.toString() + "/fairy - toggles healer fairy visibility." - ) - ) - Minecraft.getMinecraft().thePlayer.addChatMessage( - ChatComponentText( - EnumChatFormatting.GRAY.toString() + "/hl - helps change highlighted leap player on the fly" - ) - ) + TextUtils.info("§6§l HI THIS IS DULKIRMOD!", false) + TextUtils.info(" §7/enchantrune - toggles enchant rune visibility.", false) + TextUtils.info(" §7/fairy - toggles healer fairy visibility.", false) + TextUtils.info(" §7/hl - helps change highlighted leap player on the fly.", false) } } \ No newline at end of file -- cgit