diff options
| author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2024-08-05 23:01:26 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-08-05 15:01:26 +0200 |
| commit | f01c3e3dfd11cce73c890e4478691d84512e6161 (patch) | |
| tree | b26c8101e257200cdbc058f92478cba1b2bb6698 | |
| parent | 17bce62559a449f770602512603a3af88b663b18 (diff) | |
| download | notenoughupdates-f01c3e3dfd11cce73c890e4478691d84512e6161.tar.gz notenoughupdates-f01c3e3dfd11cce73c890e4478691d84512e6161.tar.bz2 notenoughupdates-f01c3e3dfd11cce73c890e4478691d84512e6161.zip | |
meta: fix /ahs command only taking 1 arg (#1290)
* fix /ahs command only taking 1 arg
* also fix it for /recipe and /bzs
| -rw-r--r-- | src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SearchCommand.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SearchCommand.kt b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SearchCommand.kt index 7e72ebfb..ea1f8e54 100644 --- a/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SearchCommand.kt +++ b/src/main/kotlin/io/github/moulberry/notenoughupdates/commands/misc/SearchCommand.kt @@ -19,7 +19,6 @@ package io.github.moulberry.notenoughupdates.commands.misc -import com.mojang.brigadier.arguments.StringArgumentType import io.github.moulberry.notenoughupdates.NotEnoughUpdates import io.github.moulberry.notenoughupdates.autosubscribe.NEUAutoSubscribe import io.github.moulberry.notenoughupdates.events.RegisterBrigadierCommandEvent @@ -38,7 +37,7 @@ class SearchCommand { @SubscribeEvent fun onCommands(event: RegisterBrigadierCommandEvent) { event.command("bzs") { - thenArgumentExecute("search", StringArgumentType.string()) { search -> + thenArgumentExecute("search", RestArgumentType) { search -> NotEnoughUpdates.INSTANCE.sendChatMessage("/bz ${this[search]}") }.withHelp("Search directly without opening the GUI") thenExecute { @@ -46,7 +45,7 @@ class SearchCommand { } }.withHelp("Search the bazaar directly with a custom search GUI") event.command("ahs") { - thenArgumentExecute("search", StringArgumentType.string()) { search -> + thenArgumentExecute("search", RestArgumentType) { search -> NotEnoughUpdates.INSTANCE.sendChatMessage("/ahs ${this[search]}") }.withHelp("Search directly without opening the GUI") thenExecute { @@ -72,7 +71,7 @@ class SearchCommand { } } event.command("recipe") { - thenArgumentExecute("search", StringArgumentType.string()) { search -> + thenArgumentExecute("search", RestArgumentType) { search -> NotEnoughUpdates.INSTANCE.sendChatMessage("/recipe ${this[search]}") } thenExecute { -> |
