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

onRemovePlayers #

open suspend fun onRemovePlayers(gameInstance: 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.

Used by:

  • GameInstance.removePlayersV1

Return #

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

Parameters #


The game instance the players are being removed from.


The players being removed from the game.


An ExtRemovePlayersRequest payload declaring any custom data for this request.