Add a greedy "command argument" #307
Labels
enhancement
New feature or request
implemented for next release
This has been implemented in the current dev build for the next public release
Description
It is currently possible to import Brigadier and create a GreedyStringArgument that lets users input a Minecraft command as an argument like so:
From https://commandapi.jorel.dev/8.4.0/brigadiersuggestions.html
Similar to how the ListArgument is a GreedyStringArgument that automatically applies a special ArgumentSuggesstions rule (#275), it would be useful if there was a CommandArgument that implemented this special ArgumentSuggestions for you. This would let users create commands like the vanilla
/execute run [another command]
without having to import Brigadier or figuring out the complicated ArgumentSuggestions.Expected code
The same example from before, but using the CommandArgument (much simpler)
A sudo command for running a command as another player
Extra details
I don't know if the Brigadier methods used already do this, but it would be nice if the CommandArgument could also receive plugin commands. Maybe this can only work after converting the plugin commands using the CommandAPI.
The text was updated successfully, but these errors were encountered: