game / pragma.gameinstance / GameInstanceService / removePlayersServiceV1 /

removePlayersServiceV1 #

suspend fun removePlayersServiceV1(session: ServiceSession, request: GameInstanceRpc.RemovePlayersServiceV1Request): GameInstanceRpc.RemovePlayersServiceV1Response

Remove players from a game instance. Invoked by other backend services or plugins via the GameInstanceApi.

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.