Skip to main content

Class: ScoreboardIdentity

Contains an identity of the scoreboard item.

Constructors

new ScoreboardIdentity()

private new ScoreboardIdentity(): ScoreboardIdentity

Returns

ScoreboardIdentity

Properties

displayName

readonly displayName: string

Remarks

Returns the player-visible name of this identity.


id

readonly id: number

Remarks

Identifier of the scoreboard identity.


type

readonly type: ScoreboardIdentityType

Remarks

Type of the scoreboard identity.

Methods

getEntity()

getEntity(): Entity

Returns

Entity

Remarks

If the scoreboard identity is an entity or player, returns the entity that this scoreboard item corresponds to.

Throws

This function can throw errors.


isValid()

isValid(): boolean

Returns

boolean

Remarks

Returns true if the ScoreboardIdentity reference is still valid.