diff options
| -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 { -> |
