game / pragma.party / PartyService / kickV1 /

kickV1 #

suspend fun kickV1(session: PlayerSession, request: PartyRpc.KickV1Request): PartyRpc.KickV1Response

Kicks a target player from the party.

Request validation:

If the calling player is not in a party, throws PragmaError.PartyService_NotInParty. If the calling player is not a leader of the party, throws PragmaError.PartyService_PlayerNotLeader. If the target player is the calling player, throws PragmaError.PartyService_CanNotKickSelf. If the target player is not in the party, throws PragmaError.PartyService_PlayerNotFound.

Kick player:

The target player is removed from the party. PartyPlugin.onRemovePlayer is then invoked. The kicked player receives a PartyRpc.RemovedV1Notification with a removal reason of KICKED. The remaining party members receive a notification with updated party state. If the kicked player is in matchmaking with the party, the party will be removed from matchmaking.

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.