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, as an unmodifiable liststatic <T extends CommandSource>
Command.Builder<T> Creates a newCommand.Builderused to construct commands.Gets the command description.booleandefault booleanDeprecated, for removal: This API element is subject to removal in a future version.booleandefault booleanDeprecated, for removal: This API element is subject to removal in a future version.since 2.4.1: this method is not guaranteed to provide meaningful or expected results.name()Gets the command name.Gets the permission node associated with this command.Deprecated, for removal: This API element is subject to removal in a future version.since 2.4.1: this method will always return an empty immutable list
-
Method Details
-
name
String name()Gets the command name.- Returns:
- the command name
-
description
String description()Gets the command description.- Returns:
- the command description
-
permission
String permission()Gets the permission node associated with this command.- Returns:
- the permission node for this command if defined, otherwise an empty string
-
aliases
Gets the aliases for this command, as an unmodifiable list- Returns:
- the aliases for this command as an unmodifiable list
-
isSuggestedOpOnly
Deprecated, for removal: This API element is subject to removal in a future version.since 2.4.1: this method is not guaranteed to provide meaningful or expected results.Gets if this command is designed to be used only by server operators.This method is deprecated for removal and will be removed in Geyser 2.13.0.
- Returns:
- if this command is designated to be used only by server operators.
-
isExecutableOnConsole
Deprecated, for removal: This API element is subject to removal in a future version.since 2.4.1: useisPlayerOnly()instead (inverted)This method is deprecated for removal and will be removed in Geyser 2.13.0.- Returns:
- true if this command is executable on console
-
isPlayerOnly
boolean isPlayerOnly()- Returns:
- true if this command can only be used by players
-
isBedrockOnly
boolean isBedrockOnly()- Returns:
- true if this command can only be used by Bedrock players
-
subCommands
Deprecated, for removal: This API element is subject to removal in a future version.since 2.4.1: this method will always return an empty immutable listThis method is deprecated for removal and will be removed in Geyser 2.13.0. -
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
-
isPlayerOnly()instead (inverted)