Skip to content

Variable: execute

Misat11 edited this page May 23, 2020 · 2 revisions

execute

When you click on item with this variable, it will execute specified commands. You can use just string or list of commands. You can define if command is executed via console or player also you can send player to another bungeecord server with this.

Yaml:

- execute: console:give Misat11 apple 64
- execute: player:msg Misat11 Hello!
- execute: bungee:hub
- execute:
  - console:give Misat11 apple 64
  - player:msg Misat11 Hello!
  - bungee:hub

Groovy:

item('DIRT') {
  execute 'console:give Misat11 apple 64'
}
item('DIRT') {
  execute 'player:msg Misat11 Hello!'
}
item('DIRT') {
  execute [
    'console:give Misat11 apple 64',
    'player:msg Misat11 Hello!'
  ]
}
Clone this wiki locally