Package com.velocitypowered.api.command
Class BrigadierCommand
java.lang.Object
com.velocitypowered.api.command.BrigadierCommand
- All Implemented Interfaces:
Command
A command that uses Brigadier for parsing the command and
providing suggestions to the client.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The return code used by aCommand
to indicate the command execution should be forwarded to the backend server. -
Constructor Summary
ConstructorsConstructorDescriptionBrigadierCommand
(com.mojang.brigadier.builder.LiteralArgumentBuilder<CommandSource> builder) Constructs aBrigadierCommand
from the node returned by the given builder.BrigadierCommand
(com.mojang.brigadier.tree.LiteralCommandNode<CommandSource> node) Constructs aBrigadierCommand
from the given command node. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.brigadier.tree.LiteralCommandNode<CommandSource>
getNode()
Returns the literal node for this command.
-
Field Details
-
FORWARD
public static final int FORWARDThe return code used by aCommand
to indicate the command execution should be forwarded to the backend server.- See Also:
-
-
Constructor Details
-
BrigadierCommand
Constructs aBrigadierCommand
from the node returned by the given builder.- Parameters:
builder
- theLiteralCommandNode
builder
-
BrigadierCommand
Constructs aBrigadierCommand
from the given command node.- Parameters:
node
- the command node
-
-
Method Details
-
getNode
Returns the literal node for this command.- Returns:
- the command node
-