fetchPlayerIdentifiers
Retrieves an all accounts for a player.
Anonymous players will have their identifiers hashed. These hashed identifiers will always start with
anon*
.
Signatures
beacon.fetchPlayerIdentifiers(playerId);
Parameters
playerId
The Sentinel UUID of the desired player.
Return Values
Type | Notes |
---|---|
Object | If the player was found, returns an object of all known accounts, with the account provider as the keys and the account identifier as values. Returns undefined if the player was not found. |
Examples
Privately provide a player all their identifiers via chat
const character = beacon.fetchCharacter(beacon.eventData.characterId);
const identifiers = beacon.fetchPlayerIdentifiers(beacon.eventData.playerId);
const providers = Object.keys(identifiers);
providers.forEach((provider) => {
beacon.sendChat(`${provider}: ${identifiers[provider]}`, {characterId: character.characterId});
});