diff options
author | Appability <appable@icloud.com> | 2022-11-12 16:45:51 -0800 |
---|---|---|
committer | Appability <appable@icloud.com> | 2022-11-12 16:45:51 -0800 |
commit | 21a3f8f1ed7230655cfe2f1e93b8edb14a2a21d0 (patch) | |
tree | d4c6376e4dbb17efb36120728401646949faf16d /src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt | |
parent | de601769d8a1b5fc7543d5b0b4a95596db926416 (diff) | |
download | AmbientAddons-21a3f8f1ed7230655cfe2f1e93b8edb14a2a21d0.tar.gz AmbientAddons-21a3f8f1ed7230655cfe2f1e93b8edb14a2a21d0.tar.bz2 AmbientAddons-21a3f8f1ed7230655cfe2f1e93b8edb14a2a21d0.zip |
add welcome message
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt b/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt index ff86228..3d62954 100644 --- a/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt +++ b/src/main/kotlin/com/ambientaddons/commands/AmbientCommand.kt @@ -1,6 +1,7 @@ package com.ambientaddons.commands import AmbientAddons +import AmbientAddons.Companion.mc import com.ambientaddons.config.Config import com.ambientaddons.utils.Extensions.withModPrefix import com.ambientaddons.utils.SBLocation @@ -23,7 +24,18 @@ class AmbientCommand : CommandBase() { "location" -> UChat.chat(SBLocation.toString().withModPrefix()) "buy" -> AutoBuyCommand.processCommand(args.drop(1)) "salvage" -> SalvageCommand.processCommand(args.drop(1)) - else -> UChat.chat("§cUnknown argument!") + else -> { + val chatWidth = mc.ingameGUI?.chatGUI?.chatWidth ?: return + val chatBreak = "§9§m" + "-".repeat(chatWidth / mc.fontRendererObj.getStringWidth("-")) + UChat.chat(""" + $chatBreak + §b§lUsage: + §a/ambient §eto access GUI settings. + §a/ambient buy §eto edit autobuy list. + §a/ambient salvage §eto configure salvage features. + $chatBreak + """.trimIndent()) + } } } }
\ No newline at end of file |