Interface Command<S>


public sealed interface Command<S>
  • Method Details

    • builder

      static <P, S> Command.Builder<S> builder(CommandManager<P,S> manager, String name)
      Creating a builder instance for proper building of the command instance
      Type Parameters:
      P - the bootstrap
      S - the sender
      Parameters:
      manager - the command manager for instantiating the command since every command is linked to it's manager
      name - the command name to start off by using it
      Returns:
      the builder instance created
      See Also:
    • manager

      CommandManager<?,S> manager()
      Command Manager instance that will be used in creation of this command
      Returns:
      the manager shared instance
    • name

      String name()
      The name of the command
      Returns:
      the command name
    • info

      @NotNull @NotNull CommandInfo info()
      The info of the command, like description, permission, and it's aliases
      Returns:
      the information of the command
    • cooldown

      @NotNull @NotNull CommandCooldown cooldown()
      Represents a command cooldown
      Returns:
      the cooldown of the command
    • requirements

      @NotNull @NotNull Set<CommandRequirement<S>> requirements()
      The requirements for the command to be executed
      Returns:
      The requirements for the command to be executed
    • defaultExecution

      void defaultExecution(S sender, Context<S> commandContext)
      The default command execution when no args are provided !
      Parameters:
      sender - the command executor !
    • syntaxes

      @NotNull @NotNull List<CommandSyntax<S>> syntaxes()
      The syntaxes registered for this command
      Returns:
      The syntaxes registered for this command
      See Also:
    • suggestions

      @NotNull @NotNull CommandSuggestionEngine<S> suggestions()
      Fetches the engine controlling and caching all suggestions for this command in a complex mapping
      Returns:
      the command suggestions holder
    • hasCooldown

      default boolean hasCooldown()