CommandAPI 9.7.0
An API for the command UI introduced in Minecraft 1.13
|
The functional interface actually representing a command to execute. More...
Public Member Functions | |
int | run (CommandContext< S > context) throws CommandSyntaxException |
Executes the command using the given CommandContext to supply information to the command. More... | |
Public Attributes | |
int | SINGLE_SUCCESS = 1 |
A static constant you can use when the command completed successfully. More... | |
The functional interface actually representing a command to execute.
This interface represents the code that will be run, when the command is executed.
<S> | the type of the command source this command will be called with |
int com.mojang.brigadier.Command< S >.run | ( | CommandContext< S > | context | ) | throws CommandSyntaxException |
Executes the command using the given CommandContext
to supply information to the command.
context | the command context to use for supplying all information the command will need |
SINGLE_SUCCESS
is a suggestion CommandSyntaxException | TODO: Why does it throw a Syntax exception here? |
int com.mojang.brigadier.Command< S >.SINGLE_SUCCESS = 1 |
A static constant you can use when the command completed successfully.
As the return value means what you want it to mean, this is merely a suggestion to make the code a bit more expressive, if you follow it.