Interface Command


public interface Command
Represents a 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

      @NonNull List<String> 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

      default @NonNull List<String> 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

      static <T extends CommandSource> Command.Builder<T> builder(@NonNull Extension extension)
      Creates a new Command.Builder used to construct commands.
      Type Parameters:
      T - the source type
      Parameters:
      extension - the extension
      Returns:
      a new command builder used to construct commands