social-common / pragma.presence / PresencePlugin /

PresencePlugin #

interface PresencePlugin

The PresencePlugin allows for customizing how player’s presences are updated.

Functions #

NameSummary

updateRichPresenceFromBackend

abstract fun updateRichPresenceFromBackend(socialId: <ERROR CLASS>, gameShardId: <ERROR CLASS>, currentPresence: Presence.Presence?, backendRequestExt: ExtRichPresenceBackendRequest): ExtRichPresence

Called when a game server or backend plugin or custom service attempts to update a payer’s presence. Use to determine how the player’s presence should be updated. The player’s current presence will be null if this action is creating their presence.

updateRichPresenceFromPlayer

abstract suspend fun updateRichPresenceFromPlayer(socialId: <ERROR CLASS>, gameShardId: <ERROR CLASS>, currentPresence: Presence.Presence?, requestExt: ExtRichPresencePlayerRequest): ExtRichPresence

Called when a player attempts to update their presence. Use to validate their request and determine how their presence should be updated. The player’s current presence will be null if this action is creating their presence.