Class CommandNode
java.lang.Object
org.geysermc.mcprotocollib.protocol.data.game.command.CommandNode
-
Constructor Summary
ConstructorsConstructorDescriptionCommandNode(CommandType type, boolean executable, boolean allowsRestricted, int[] childIndices, OptionalInt redirectIndex, @Nullable String name, @Nullable CommandParser parser, @Nullable CommandProperties properties, @Nullable String suggestionType) Creates a newCommandNodeinstance. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanbooleanint[]Child node indices.@Nullable StringgetName()Name of the node, if type is LITERAL or ARGUMENT.@Nullable CommandParserNode parser, if type is ARGUMENT.@Nullable CommandPropertiesCommand properties, if type is ARGUMENT and the parser has properties.Redirect index, or empty if none is set.@Nullable StringSuggestions type, if present.getType()Type of command.inthashCode()booleanWhether restricted commands are allowed.booleanWhether the node is executable.@NonNull StringtoString()
-
Constructor Details
-
CommandNode
public CommandNode(CommandType type, boolean executable, boolean allowsRestricted, int[] childIndices, OptionalInt redirectIndex, @Nullable String name, @Nullable CommandParser parser, @Nullable CommandProperties properties, @Nullable String suggestionType) Creates a newCommandNodeinstance.- Parameters:
type- Type of command.executable- Whether the node is executable.allowsRestricted- Whether restricted commands are allowed.childIndices- Child node indices.redirectIndex- Redirect index, or empty if none is set.name- Name of the node, if type is LITERAL or ARGUMENT.parser- Node parser, if type is ARGUMENT.properties- Command properties, if type is ARGUMENT and the parser has properties.suggestionType- Suggestions type, if present. SeeSuggestionTypefor vanilla defaults.
-
-
Method Details
-
getType
Type of command. -
isExecutable
public boolean isExecutable()Whether the node is executable. -
isAllowsRestricted
public boolean isAllowsRestricted()Whether restricted commands are allowed. -
getChildIndices
public int[] getChildIndices()Child node indices. -
getRedirectIndex
Redirect index, or empty if none is set. -
getName
Name of the node, if type is LITERAL or ARGUMENT. -
getParser
Node parser, if type is ARGUMENT. -
getProperties
Command properties, if type is ARGUMENT and the parser has properties. -
getSuggestionType
Suggestions type, if present. SeeSuggestionTypefor vanilla defaults. -
equals
-
canEqual
-
hashCode
-
toString
-