Events
Perfom (conditional) actions when opening/closing the menu
Example
Note
The conditions will be explained in details later
In the open menu event, the {reason} variable will return
You can see how it is used in the example above, we check if the menu has been opened for the player by the console or if it was reopen for the player because of a reload.
If the
return
action is executed, the event will be canceled. You can see that we use this in the open event of the example in the deny commands of the condition. This way, if the player doesn't met the condition, it won't open the menu.Check this section of the wiki to get all Menu Events (and their reasons for the Open and Close events).
Last updated