LogicUsing Events
Player Quit Map
Triggers just before a player leaves the map instance.
This global event triggers when a player is about to leave the map, whether by using /leave, disconnecting, or being kicked. This is your last chance to run logic for that player in the current session.
Note: This is a global event and is not tied to a specific region. You can configure it in the "global" region's event menu.
Action Values
Player: The player who is leaving.
Event Configuration
This event has no special configuration.
Use Cases
- Saving a player's score or other stats to a persistent property so it's remembered when they next join.
- Cleaning up any player-specific spawned entities or holograms.
- Announcing to other players that someone has left the game.
Example: Saving Player Score
- Property: Create a persistent
Player Numberproperty calledTotalScore. - Region: Select the "global" region.
- Event: Add a
Player Quit Mapevent. - Action:
Change Property:- Property:
TotalScore - Holder:
Player - Operator:
Add - Value: Use the
Propertyvalue type to select the player's currentScoreproperty. This adds their session score to their total persistent score.
- Property: