Package org.geysermc.geyser.api.command
Interface Command
public interface Command
Represents a command.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaliases()Gets the aliases for this command.static <T extends CommandSource>
Command.Builder<T>Creates a newCommand.Builderused to construct commands.@NonNull StringGets the command description.default booleanUsed to send a deny message to Java players if this command can only be used by Bedrock players.booleanGets if this command is executable on console.booleanGets if this command is designed to be used only by server operators.@NonNull Stringname()Gets the command name.@NonNull StringGets the permission node associated with this command.Gets the subcommands associated with this command.
-
Method Details
-
name
@NonNull String name()Gets the command name.- Returns:
- the command name
-
description
@NonNull String description()Gets the command description.- Returns:
- the command description
-
permission
@NonNull String permission()Gets the permission node associated with this command.- Returns:
- the permission node for this command
-
aliases
Gets the aliases for this command.- Returns:
- the aliases for this command
-
isSuggestedOpOnly
boolean isSuggestedOpOnly()Gets if this command is designed to be used only by server operators.- Returns:
- if this command is designated to be used only by server operators.
-
isExecutableOnConsole
boolean isExecutableOnConsole()Gets if this command is executable on console.- Returns:
- if this command is executable on console
-
subCommands
Gets the subcommands associated with this command. Mainly used within the Geyser Standalone GUI to know what subcommands are supported.- Returns:
- the subcommands associated with this command
-
isBedrockOnly
default boolean isBedrockOnly()Used to send a deny message to Java players if this command can only be used by Bedrock players.- Returns:
- true if this command can only be used by Bedrock players.
-
builder
Creates a newCommand.Builderused to construct commands.- Type Parameters:
T- the source type- Parameters:
extension- the extension- Returns:
- a new command builder used to construct commands
-