Interface Command

    • Method Detail

      • canExecute

        boolean canExecute​(CommandCause cause)
        Test whether this command can probably be executed given this Cause.

        If implementations are unsure if the command can be executed by the source, true should be returned. Return values of this method may be used to determine whether this command is listed in command listings.

        Parameters:
        cause - The Cause to check
        Returns:
        Whether this command will execute
      • extendedDescription

        Optional<Component> extendedDescription​(CommandCause cause)
        Gets a longer formatted help message about this command.

        The help system may display this description when displaying details about this specific command. It should not contain the description provided by shortDescription(CommandCause).

        Parameters:
        cause - The Cause of the help request
        Returns:
        A description
      • usage

        Component usage​(CommandCause cause)
        Gets the usage string of this command.

        A usage string may look like [<world>] <var1> <var2>.

        The string must not contain the command alias.

        Parameters:
        cause - The Cause of the help request
        Returns:
        A usage string