FivePD API
Interfaces

IPlayerDataService

Provides access to player data, including respective events and methods for modifying a player.

Methods

FindUserByLicense

Finds the User object corresponding to the .

Parameters

NameTypeDescription
playerPlayerThe player to find.
withChangeTrackingboolSpecifies whether to add AsNoTracking to the query or not.

Returns

NameType
UserThe corresponding object.

AnyPlayerIdMatchesWithUserId

Checks whether any identifier of the specified player matches with any identifier of the specified user.

Parameters

NameTypeDescription
playerPlayerThe player.
userUserThe user.

Returns

NameType
boolA boolean.

IncreaseRank

Increases the rank of the specified player to the next rank with higher required experience points. In order to use this the ProgressionSystem feature flag must be enabled.

Parameters

NameTypeDescription
playerFPlayerThe player.

DecreaseRank

Decreases the rank of the specified player to the previous rank with lower required experience points. In order to use this the ProgressionSystem feature flag must be enabled.

Parameters

NameTypeDescription
playerFPlayerThe player.

Events

PlayerDutyStatusChanged

Fires when the duty status of a player has been changed.

Type: EventHandler<PlayerDutyStatusChangeEventArgs>

PlayerRankChanged

Fires when a player's rank has been changed.

Type: EventHandler<PlayerRankChangeEventArgs>

PlayerDivisionChanged

Fires when a player's division has been changed.

Type: EventHandler<PlayerDivisionChangeEventArgs>