game / pragma.gameinstance / GameInstanceService / removePlayersV2 /

removePlayersV2 #

suspend fun removePlayersV2(session: PartnerSession, request: GameInstanceRpc.RemovePlayersV2Request): GameInstanceRpc.RemovePlayersV2Response

Remove players from a game instance. Invoked by the game server.

The players being removed are passed into the GameInstancePlugin.handleBackendRemovePlayersRequest plugin method for an opportunity for custom data to be created on a ExtRemovedFromGame that is sent to the players on a GameInstanceRpc.RemovedFromGameV1Notification. Players can only be removed if they have not been previously removed.

The removed players are released and marked as removed from the game instance to be sent back to their party via the PartyRpc.ReturnFromGameInstanceV1Request.

Plugins

  • GameInstancePlugin.handleBackendRemovePlayersRequest - Remove from game instance and/or set custom data to send to the players.

PragmaResultErrors

  • PragmaError.GameInstanceService_UnknownGameInstanceId - If the game instance id from the request is not found.
  • PragmaError.GameInstanceService_PlayerNotInGameInstance - If the player is not in the game instance specified.
  • PragmaError.GameInstanceService_InternalError - If a lock on the specified game instance could not be held.