Package org.geysermc.geyser.api.command
Interface Command.Builder<T extends CommandSource>
- Enclosing interface:
- Command
public static interface Command.Builder<T extends CommandSource>
-
Method Summary
Modifier and TypeMethodDescriptionSets the aliases.bedrockOnly(boolean bedrockOnly)Sets if this command is bedrock only.@NonNull Commandbuild()Builds the command.description(@NonNull String description)Sets the command description.executableOnConsole(boolean executableOnConsole)Sets if this command is executable on console.executor(@NonNull CommandExecutor<T> executor)Sets theCommandExecutorfor this command.Sets the command name.permission(@NonNull String permission)Sets the permission node.Defines the source type to use for this command.subCommands(@NonNull List<String> subCommands)Sets the subcommands.suggestedOpOnly(boolean suggestedOpOnly)Sets if this command is designed to be used only by server operators.
-
Method Details
-
source
Defines the source type to use for this command.Command source types can be anything that extend
CommandSource, such asGeyserConnection. This will guarantee that the source used in the executor is an instance of this source.- Parameters:
sourceType- the source type- Returns:
- the builder
-
name
Sets the command name.- Parameters:
name- the command name- Returns:
- the builder
-
description
Sets the command description.- Parameters:
description- the command description- Returns:
- the builder
-
permission
Sets the permission node.- Parameters:
permission- the permission node- Returns:
- the builder
-
aliases
Sets the aliases.- Parameters:
aliases- the aliases- Returns:
- the builder
-
suggestedOpOnly
Sets if this command is designed to be used only by server operators.- Parameters:
suggestedOpOnly- if this command is designed to be used only by server operators- Returns:
- the builder
-
executableOnConsole
Sets if this command is executable on console.- Parameters:
executableOnConsole- if this command is executable on console- Returns:
- the builder
-
subCommands
Sets the subcommands.- Parameters:
subCommands- the subcommands- Returns:
- the builder
-
bedrockOnly
Sets if this command is bedrock only.- Parameters:
bedrockOnly- if this command is bedrock only- Returns:
- the builder
-
executor
Sets theCommandExecutorfor this command.- Parameters:
executor- the command executor- Returns:
- the builder
-
build
@NonNull Command build()Builds the command.- Returns:
- the command
-