Command Sequences

How to use Sequences for commands.

This is how to use the sequence= [location] tag.

The sequence tag is simply used to duplicate the same commands into different places in a YAML file. An example is below. By using "sendMessage'' this means that it will check in the file for that location for a list in the file. Once it has found it, wherever the sequence is, it will insert those commands into the item's commands.

panels:
  adminPanel:
    perm: default
    rows: 5
    title: '&6&lAdmin Panel'
    commands:
    - mod
    empty: 'Black_Stained_glass_pane'
    sendMessage:
    - console= title %cp-player-name% times 20 60 20
    - console= title %cp-player-name% subtitle {"text":"Has recieved their punishment","color":"green"}
    - console= title %cp-player-name% title {"text":"%cp-player-input%"}
    item:
      '22':
        material: COMPASS
        name: '&bBan'
        commands:
        - cpc
        player-input:
        - 'console= ban %cp-player-input%'
        - 'sequence= sendMessage'
      '20':
        material: BOOK
        name: '&4Kick'
        commands:
        - cpc
        player-input:
        - 'console= kick %cp-player-input%'
        - 'sequence= sendMessage'
      '24':
        material: orange_dye
        name: '&6Warn'
        commands:
        - cpc        
        player-input:
        - 'console= warn %cp-player-input%'
        - 'sequence= sendMessage'

Last updated