Variable: execute - ScreamingSandals/SimpleInventories GitHub Wiki
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!'
]
}