game / pragma.party / PartyService /
PartyService #
internal class PartyService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, instanceCount: Int = pragmaNode.getDistributedServiceInstanceCount(PartyService::class), inviteCodeGenerator: InviteCodeGenerator = InviteCodeGenerator(instanceId, instanceCount), partyClient: PartyClient = PartyClient(), gameInstanceClient: GameInstanceClient = GameInstanceClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), multiplayerClient: MultiplayerClient = MultiplayerClient(), alertingMutexFactory: AlertingMutexFactory = AlertingMutexFactory(), partyManager: PartyManager = PartyManager(), partyProxy: PartyProxy = PartyProxy(), gameServerCompatibility: GameServerCompatibility = GameServerCompatibility(), notificationClient: PartyNotificationClient = PartyNotificationClient(), timeProxy: TimeProxy = TimeProxy()) : DistributedService, RoutingIdGenerator, ConfigHandler<PartyConfig>
The PartyService is a game flow service where players may join up with each other, configure their game settings, and enter matchmaking together.
Constructors #
PartyService  | fun PartyService(pragmaNode: PragmaNode, instanceId: <ERROR CLASS>, routingUtils: RoutingUtils = RoutingUtils.defaultInstance, instanceCount: Int = pragmaNode.getDistributedServiceInstanceCount(PartyService::class), inviteCodeGenerator: InviteCodeGenerator = InviteCodeGenerator(instanceId, instanceCount), partyClient: PartyClient = PartyClient(), gameInstanceClient: GameInstanceClient = GameInstanceClient(), matchmakingClient: MatchmakingClient = MatchmakingClient(), multiplayerClient: MultiplayerClient = MultiplayerClient(), alertingMutexFactory: AlertingMutexFactory = AlertingMutexFactory(), partyManager: PartyManager = PartyManager(), partyProxy: PartyProxy = PartyProxy(), gameServerCompatibility: GameServerCompatibility = GameServerCompatibility(), notificationClient: PartyNotificationClient = PartyNotificationClient(), timeProxy: TimeProxy = TimeProxy()) | 
Functions #
| Name | Summary | 
|---|---|
 Assigns party leader to another player.  | |
 Cancels a party invite, invoking PartyPlugin.handlePlayerCancelInviteRequest.  | |
 Creates a new party, invoking PartyPlugin.initializeParty and PartyPlugin.onAddPlayer.  | |
 Overrides a party’s game server version. Use only in development.  | |
 Enters a party into matchmaking, invoking PartyPlugin.handlePlayerEnterMatchmakingRequest.  | |
 Queries cached party data by party id.  | |
 Queries cached party data by party id.  | |
 Joins a party using an invite code, invoking PartyPlugin.onAddPlayer.  | |
 Joins a party using a party id, invoking PartyPlugin.onAddPlayer.  | |
 Kicks a player from the party, invoking PartyPlugin.onRemovePlayer. Only usable by party leaders.  | |
 Removes a player from a party, invoking PartyPlugin.onRemovePlayer.  | |
 Leaves the party, invoking PartyPlugin.onRemovePlayer.  | |
 Notification handler for player disconnect. Removes the player from the party they were in.  | |
 Responds to a party invite. If the invite is accepted, PartyPlugin.onAddPlayer is invoked.  | |
 Returns a player to their party from matchmaking, invoking PartyPlugin.returnFromMatchmaking.  | |
 Sends a party invite, invoking PartyPlugin.handlePlayerSendInviteRequest.  | |
 Sets a player’s ping latency map for different game server zones.  | |
 Sets a player’s preferred game server zones.  | |
 Sets a player’s ready state, invoking PartyPlugin.canChangeReady.  | |
 Syncs party state from the platform to the client.  | |
 Updates a player in the party, invoking PartyPlugin.updatePlayer.  | |
 Updates the party, invoking PartyPlugin.updateParty.  | |
 Update the party, invoking PartyPlugin.handleBackendUpdateRequest.  |