game-common / / PartyPlugin / onAddPlayer /

onAddPlayer #

abstract suspend fun onAddPlayer(requestExt: ExtPlayerJoinRequest, playerToAdd: PartyPlayer, party: Party, partyConfig: PartyConfig)

Called before the player has been added to the party. Use to prepare the new player to be added to the party. Perform any state mutations directly on the player or party objects. The player will be added to the party by the platform after this call.

Used by:

  • PartyService.createV1
  • PartyService.respondToInviteV1
  • PartyService.joinWithInviteCodeV1

Parameters #


Customer-defined ext for providing game specific logic to the player add process.


The player being added to the party.


The party the player is about to join.


The current service-level PartyConfig.