fetchPlayerIdentifier
Retrieves an account for a player.
Anonymous players will have their identifiers hashed. These hashed identifiers will always start with
anon*
.
Signatures
beacon.fetchPlayerIdentifier(playerId, provider);
Parameters
playerId
The Sentinel UUID of the desired player.
provider
Currently the only supported provider is EOS
, but expect a Discord
provider in the future.
Return Values
Type | Notes |
---|---|
String | If the player was found and has an account for the request provider, returns an the account ID as a String . Returns undefined otherwise. |
Examples
Fetch the Epic Online Services ID of the player that just joined the server
const playerEOSId = beacon.fetchPlayerIdentifier(beacon.eventData.playerId, 'EOS');