game-common / pragma.party / PartyPlugin / onAddPlayer /
onAddPlayer #
open suspend fun onAddPlayer(requestExt: ExtPlayerJoinRequest, playerToAdd: Party.PartyPlayer, party: 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 #
requestExt | Customer-defined ext for providing game specific logic to the player add process. |
playerToAdd | The player being added to the party. |
party | The party the player is about to join. |
partyConfig | The current service-level PartyConfig. |