diff options
Diffstat (limited to 'src/main/kotlin/dulkirmod/command/LeapNameCommand.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/command/LeapNameCommand.kt | 25 |
1 files changed, 25 insertions, 0 deletions
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<String>) { + 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 |