Contains an identity of the scoreboard item.
Properties
displayName
read-only displayName: string;
Returns the player-visible name of this identity.
Type: string
id
read-only id: number;
Identifier of the scoreboard identity.
Type: number
isValid
read-only isValid: boolean;
Returns true if the ScoreboardIdentity reference is still valid.
Type: boolean
type
read-only type: ScoreboardIdentityType;
Type of the scoreboard identity.
Type: ScoreboardIdentityType
Methods
getEntity
getEntity(): Entity | undefined
If the scoreboard identity is an entity or player, returns the entity that this scoreboard item corresponds to.
Returns Entity | undefined
Notes:
- This function can throw errors.