game-common / pragma.gameinstance / GameInstancePlugin / handlePlayerLeaveRequest /

handlePlayerLeaveRequest #

open suspend fun handlePlayerLeaveRequest(gameInstanceSnapshot: GameInstance.GameInstance, requestingPlayer: GameInstance.GamePlayer, requestExt: ExtPlayerLeaveRequest)

Called when receiving a player request to leave a game instance.

Remove the player from the game instance using the GameInstance.GameInstance.removePlayer method.

Default implementation: prevents the players from leaving the game instance.

Parameters #

gameInstanceSnapshot

The game instance to be updated.

requestingPlayer

The player requesting to leave the game instance.

requestExt

The data sent along with the request.