social / pragma.friend / FriendService /
FriendService #
class FriendService(pragmaNode: PragmaNode, instanceId: UUID, identityCache: IdentityCache = IdentityCache(), friendManager: FriendManager = FriendManager(), friendCache: FriendCache = FriendCache(), friendClient: FriendClient = FriendClient(), friendSectionsBuilder: FriendSectionsBuilder = FriendSectionsBuilder(), presenceCache: PresenceCache = PresenceCache()) : DistributedService, ConfigHandler<FriendServiceConfig>
FriendService allows players to manage their friends.
Friends are bidirectional, if Player A is Player B’s friend, then Player B is Player A’s friend.
This service can be used to view, update and remove friend lists, send friend invitations, and receive friend invitations.
Constructors #
FriendService | internal fun FriendService(pragmaNode: PragmaNode, instanceId: UUID, identityCache: IdentityCache = IdentityCache(), friendManager: FriendManager = FriendManager(), friendCache: FriendCache = FriendCache(), friendClient: FriendClient = FriendClient(), friendSectionsBuilder: FriendSectionsBuilder = FriendSectionsBuilder(), presenceCache: PresenceCache = PresenceCache()) |
Functions #
Name | Summary |
---|---|
Prevents a player from receiving invites from the blocked player. Friendship status and pending friend invites between the two players will be removed. | |
Service to service call for deleting all friend data for a player. Invoked in DataRights delete flows. | |
Gets a player’s presences. | |
Service to service call for updating the state of a friend list. | |
Returns a list of friends, sent invites, and received invites for a player. | |
Service to service call to retrieve all friend data records for a player. Invoked in DataRights flows. | |
Service to service rpc call for fetching a list of presences. Used to populate presences when a user logs in | |
Gets a player’s presences. | |
An integration-test RPC Request to delete all friend data for a player. | |
Removes a friend from a player’s friend list. Removes the requesting player from the specified player’s friend list. | |
Responds to a friend invite from the specified player. | |
Sends a friend invite to the specified player. | |
Sends a friend invite to the specified player. | |
Lets a player change whether they can accept incoming friend invites anymore. If the setting is false, when other players attempt to send a friend request, they will receive a FriendResultStatus.BlockedByInvitee. | |
Sets a player’s presence on a game shard from a plugin, custom service, or game server. | |
Sets a player’s presence on a game shard from a player client. | |
Prevents a player from receiving invites from the blocked player. Friendship status and pending friend invites between the two players will be removed. |