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
  • Field Details

    • USAGE

      public static final EditorString USAGE
      The string of the usage of the number action
    • INVALID_VALUE

      public static final EditorString INVALID_VALUE
      The string of the message when the actor uses an invalid value
  • Constructor Details

    • NumberAction

      public NumberAction()
  • Method Details

    • usage

      public EditorString 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 void execute(EditorActor actor, Number value, String[] args)
      Execute the action
      Parameters:
      actor - the actor
      value - the value
      args - the arguments
    • valueComplete

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

      public void 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