Class AnnotatedCommand

  • All Implemented Interfaces:
    Command

    public final class AnnotatedCommand
    extends Object
    implements Command
    Command implemented via annotations.
    • Method Detail

      • run

        public reactor.core.publisher.Mono<Void> run​(Context ctx)
        Description copied from interface: Command
        Defines the action of the command
        Specified by:
        run in interface Command
        Parameters:
        ctx - the context
        Returns:
        a Mono that completes empty when the command is successful, and emits an error when something goes wrong.
      • getAliases

        public Set<String> getAliases()
        Description copied from interface: Command
        Gets the aliases for this command.
        Specified by:
        getAliases in interface Command
        Returns:
        the set of aliases
      • getDocumentation

        public CommandDocumentation getDocumentation​(Locale locale)
        Description copied from interface: Command
        Gets the documentation of the command.
        Specified by:
        getDocumentation in interface Command
        Parameters:
        locale - the locale indicating the language of the documentation
        Returns:
        the documentation
      • getRequiredPermission

        public String getRequiredPermission()
        Description copied from interface: Command
        Gets the name of the permission required to use the command.
        Specified by:
        getRequiredPermission in interface Command
        Returns:
        the required permission. Empty string means no requirement
      • getMinimumPermissionLevel

        public PermissionLevel getMinimumPermissionLevel()
        Description copied from interface: Command
        Gets the permission level required to use the command.
        Specified by:
        getMinimumPermissionLevel in interface Command
        Returns:
        the required permission level
      • getScope

        public Scope getScope()
        Description copied from interface: Command
        Gets the scope of this command.
        Specified by:
        getScope in interface Command
        Returns:
        the scope