diff options
author | Appability <appable@icloud.com> | 2022-11-13 02:53:02 -0800 |
---|---|---|
committer | Appability <appable@icloud.com> | 2022-11-13 02:53:02 -0800 |
commit | 4df8a87c044a1194bff4409974944c81ba191430 (patch) | |
tree | a84e137ccfb9c966216829bb56ef341f955b2352 /src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt | |
parent | f9826fb1392f946a91e6079cf424ca288ff56d6f (diff) | |
download | AmbientAddons-4df8a87c044a1194bff4409974944c81ba191430.tar.gz AmbientAddons-4df8a87c044a1194bff4409974944c81ba191430.tar.bz2 AmbientAddons-4df8a87c044a1194bff4409974944c81ba191430.zip |
fml i almost made idkman reroll ANOTHER handle
also significant improvements to salvage
list editing, cleanup chat formatting, and fix config description
Diffstat (limited to 'src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt')
-rw-r--r-- | src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt b/src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt index 1cead71..9899d40 100644 --- a/src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt +++ b/src/main/kotlin/com/ambientaddons/commands/AutoBuyCommand.kt @@ -13,7 +13,7 @@ object AutoBuyCommand { val newPrice = args.getOrNull(2)?.toIntOrNull() persistentData.autoBuyItems[item] = newPrice persistentData.save() - UChat.chat("§aAdded item §a§l$item §awith ${if (newPrice == null) "no minimum price." else " minimum price §a§l$newPrice"}".withModPrefix()) + UChat.chat("§aAdded item §a§l$item §awith ${if (newPrice == null) "no maximum price." else "maximum price §a§l$newPrice"}".withModPrefix()) } "remove" -> { val item = args[1] @@ -24,14 +24,16 @@ object AutoBuyCommand { } else UChat.chat("§cItem §c§l$item §cdoes not exist!".withModPrefix()) } "list" -> { - UChat.chat("§2§lItems".withModPrefix()) + UChat.chat(Chat.getChatBreak()) + UChat.chat("§b§lAutobuy List") persistentData.autoBuyItems.forEach { if (it.value == null) { - UChat.chat(" §b${it.key}") + UChat.chat(" §a${it.key}") } else { - UChat.chat(" §b${it.key} §7(max price §a${it.value} §7coins)") + UChat.chat(" §a${it.key} §e(maximum price §a§l${it.value} §ecoins)") } } + UChat.chat(Chat.getChatBreak()) } else -> { UChat.chat(""" |