Events
Perfom (conditional) actions when opening/closing the menu
Example
Events:
#Open events
Open:
#Condition which requires the player to have the permission trmenu.use to open it
#OR if he reopened the menu because of the auto-reload
#OR if the console opened the menu for the player.
- condition: 'hasPerm.trmenu.use or is.{reason}.RELOAD or is.{reason}.CONSOLE'
#Actions executed if the player has the permission trmenu.use.
actions:
- 'sound: BLOCK_CHEST_OPEN-1-0'
#Actions executed if the player doesn't have the permission trmenu.use.
deny:
- 'sound: ENTITY_ITEM_BREAK-1-0'
- 'title: <title=&c&lPermission Required><subtitle=&7&lYou need permission &6<rmenu.use &7<o open this menu>'
#The return action won't let the menu open.
- 'return'
#Close events
Close:
#A simple sound action
- 'sound: BLOCK_CHEST_CLOSE-1-0'Note
Last updated
Was this helpful?