Number Argument

This is a processor to handle the numeric argument

Format

menu-settings:
  argument-processor: # Add the processor to the menu
    <name>:
      type: number
      action:
      - action
      - action
      - action
      - action
      invalid-action:
      - action
      - action
      - action
      suggest:
      - 0
      - 1
      - 2

Note

  • suggest: the list of suggestions when the player uses tab-completion
  • action: the Action to be called when the argument length is not enough
  • invalid-action: the Action to be called when the argument is invalid

Example

menu-settings:
  command: giveapple
  argument-processor:
    amount:
      type: number
      action: "tell: &cAmount is required"

button:
  slot: 0
  id: apple
  name: "&bGive apple"
  command: "console: give {player} apple {arg_amount}"