game / pragma.party / PartyService / leaveServiceV1 /

leaveServiceV1 #

suspend fun leaveServiceV1(session: ServiceSession, request: PartyRpc.LeaveServiceV1Request): PartyRpc.LeaveServiceV1Response

Leaves the current party.

Remove player:

The player is removed from their party. PartyPlugin.onRemovePlayer is invoked after removal. If the last leader in a party leaves, leadership will be given to a random player remaining within the party. If the player is in matchmaking with the party, the party will be removed from matchmaking. If the party is now empty, it will be shut down. If the player is not in the party, throws PragmaError.PartyService_PlayerNotFound.

GameServerVersion recalculation:

GameServerCompatibility.calculateGameServerVersion is invoked to determine the overall GameServerVersion for the party if the new player joins. If no GameServerVersion is supported, a warning is logged. Any player that does not have a supported game server version will receive a PartyRpc.GameClientNotSupportedV1Notification, and all other players will receive a PartyRpc.PartyClientVersionMismatchV1Notification. If PartyImpl.overrideGameServerVersion has been set, the game server calculation will be skipped and the previously set gameServerVersion will be used.