game / / PartyService / leaveV1 /

leaveV1 #

suspend fun leaveV1(session: PlayerSession, request: PartyRpc.LeaveV1Request, sessionAction: SessionAction.Builder): PartyRpc.LeaveV1Response

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.

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 via PartyRpc.UpdatePartyV1Request, the game server calculation will be skipped and the previously set gameServerVersion will be used.