From bfa2b37155711e2a907f15d6e56d18378ae4f723 Mon Sep 17 00:00:00 2001 From: ingle Date: Fri, 28 Oct 2022 12:17:26 -0500 Subject: + Efficiency improvements + command for setting leap highlight + (I THINK) abiphone dnd (on by default) --- .../kotlin/dulkirmod/command/LeapNameCommand.kt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/kotlin/dulkirmod/command/LeapNameCommand.kt (limited to 'src/main/kotlin/dulkirmod/command') diff --git a/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt new file mode 100644 index 0000000..3d7b4f2 --- /dev/null +++ b/src/main/kotlin/dulkirmod/command/LeapNameCommand.kt @@ -0,0 +1,25 @@ +package dulkirmod.command + +import dulkirmod.DulkirMod +import dulkirmod.config.Config +import net.minecraft.command.CommandException +import net.minecraft.command.ICommandSender +import net.minecraft.util.ChatComponentText + +class LeapNameCommand : ClientCommandBase("hl") { + @Throws(CommandException::class) + override fun processCommand(sender: ICommandSender, args: Array) { + if (args.isEmpty()) { + DulkirMod.mc.thePlayer.addChatMessage( + ChatComponentText("${DulkirMod.CHAT_PREFIX} §6Please give a username argument (case sensitive) for who you want to be highlighted.") + ) + return + } + + val username = args[0] + Config.highlightLeapName = username + DulkirMod.mc.thePlayer.addChatMessage( + ChatComponentText("${DulkirMod.CHAT_PREFIX} §6Selected Leap Highlight for username: §f$username§6.") + ) + } +} \ No newline at end of file -- cgit