-
-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
Comments
The Brigadier methods only use Minecraft-registered commands. It may be possible to use the |
Merged
Merged to |
JorelAli
added
the
implemented for next release
This has been implemented in the current dev build for the next public release
label
Nov 3, 2022
Implemented in release 8.6.0. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: