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

onRemovePlayers #

open suspend fun onRemovePlayers(gameInstanceSnapshot: GameInstance.GameInstance, playersToRemove: List<PlayerToRemove>, requestExt: ExtRemovePlayersRequest): Map<<ERROR CLASS>, ExtRemovedFromGame>

Called when players are removed from the game to prepare any custom data to send to the removed players.

Removed players will receive a GameInstanceRpc.RemovedFromGameV1Notification with the ExtRemovedFromGame returned from this method. If the player does not need to receive this notification, simply do not return an ext for the player.

Default implementation: includes each player in the returned map.

Return #

A map of the removed player ids to their custom ExtRemovedFromGame data to send to the player client.

Parameters #

gameInstanceSnapshot

The game instance the players are being removed from.

playersToRemove

The players being removed from the game.

requestExt

An ExtRemovePlayersRequest payload declaring any custom data for this request.