java.lang.Object
io.github.projectunified.minigamecore.editor.extra.action.NumberAction
All Implemented Interfaces:
EditorAction

public abstract class NumberAction extends Object implements EditorAction
The EditorAction for number value
  • Constructor Details

    • NumberAction

      public NumberAction()
  • Method Details

    • usage

      public String usage()
      Description copied from interface: EditorAction
      Get the usage of the action
      Specified by:
      usage in interface EditorAction
      Returns:
      the usage
    • complete

      public List<String> complete(EditorActor actor, String[] args)
      Description copied from interface: EditorAction
      Get the completion suggestions, given the arguments
      Specified by:
      complete in interface EditorAction
      Parameters:
      actor - the action
      args - the argument
      Returns:
      the suggestions
    • execute

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

      public Stream<? extends Number> valueComplete(EditorActor actor)
      Get number suggestions
      Parameters:
      actor - the actor
      Returns:
      the suggestions
    • execute

      public boolean execute(EditorActor actor, String[] args)
      Description copied from interface: EditorAction
      Execute the action
      Specified by:
      execute in interface EditorAction
      Parameters:
      actor - the actor
      args - the arguments
      Returns:
      true if the action is executed successfully