Actions

Actions that can be performed after a requirement

With a requirement you can define actions on success or failure. Here are the actions that can be performed.

Example

You will have to put an action list like this:

success_actions:
  - type: player_command
    commands:
      - "firstcommand"
      - "seconds commands %player%"
  - type: console_command
    commands:
      - "firstcommand"
      - "seconds commands %player%"      
  - type: message
    messages:
      - "firstcommand"
      - "seconds commands %player%"   

You can add a delay, in tick, for each item if below. Do like this:

success_actions:
  - type: player_command
    delay: 10 # 10 ticks
    commands:
      - "firstcommand"
      - "seconds commands %player%"
ActionDescription
- type: player_command
  commands:
    - "firstcommand"
    - "seconds commands %player%"
  commandInChat: false # false by default

Execute commands as the player. You can send the command in the player tchat.

- type: console_command
  commands:
    - "firstcommand"
    - "seconds commands %player%"

Execute commands as the console.

- type: message
  messages:
    - "my message"
    - "my second messages"
  minimessage: true # true by default

Send a message to the player. You can use placeholders and color/format codes here. Mini message format is enable by default if your server support it.

- type: broadcast
  messages:
    - "my message"
    - "my second message to %player%"
  minimessage: true # true by default

Send a message to the online players. You can use placeholders and color/format codes here. Mini message format is enable by default if your server support it.

- type: chat
  messages:
    - "my message"

Sends messages instead of the player.

- type: close

Closes the player’s inventory.

- type: inventory
  inventory: <inventory name>
  plugin: <plugin name>
  page: <page>
  arguments: <argument list>

Opens an inventory of zMenu.

- type: connect
  server: <server name>

Allows sending the player to another server, only works with BungeeCord and Velocity.

- type: sound
  sound: <xsound>
  pitch: <sound pitch> # 1.0f by default
  volume: <sound volume> # 1.0f by default

Send a sound to a player, you must use XSound for sound.

- type: broadcast_sound
  sound: <xsound>
  pitch: <sound pitch> # 1.0f by default
  volume: <sound volume> # 1.0f by default

Send a sound to the online players, you must use XSound for sound.

- type: data
  action: <SET/REMOVE/ADD/SUBTRACT>
  key: <data key>
  value: <data value>
  seconds: <expire seconds> # 0 by default

Update player data.

- type: refresh  

Refresh current button. Work only in click requirement

- type: back

Return to previous inventory.

- type: shopkeeper
  name: <shopkeeper name>

Open a Shopkeeper trading inventory

- type: book
  author: "Maxlego08" # Book author
  title: "&cTest" # Book title
  lines: # Book pages
    1: # First page
      - '     #34ebe8zMenu'
      - ''
      - ''
      - '<hover:show_text:"#34eba8Open an url !"><click:open_url:"https://minecraft-inventory-builder.com/">#f0af24Open URL<reset>'

Open a book

- type: actionbar
  message: "my message"
  minimessage: true # true by default

Allows to send a message in the action bar of the player

Last updated