Interface EditorAction

All Known Subinterfaces:
Editor<T>
All Known Implementing Classes:
BooleanAction, EnumAction, ListEditor, NumberAction, ValueEditor

public interface EditorAction
An action of the editor
  • Method Details

    • execute

      boolean execute(EditorActor actor, String[] args)
      Execute the action
      Parameters:
      actor - the actor
      args - the arguments
      Returns:
      true if the action is executed successfully
    • description

      String description()
      Get the description of the action
      Returns:
      the description
    • complete

      default Collection<String> complete(EditorActor actor, String[] args)
      Get the completion suggestions, given the arguments
      Parameters:
      actor - the action
      args - the argument
      Returns:
      the suggestions
    • usage

      default String usage()
      Get the usage of the action
      Returns:
      the usage
    • requiresArgs

      default boolean requiresArgs()
      Check if the action requires arguments
      Returns:
      true if it does