@minecraft
    正在准备搜索索引...

    类 ScoreboardIdentity

    表示记分板上的分数持有者。

    Contains an identity of the scoreboard item.

    索引

    属性

    displayName: string

    此分数持有者在玩家视角显示的名称。

    Returns the player-visible name of this identity.

    id: number

    此分数持有者的 ID。

    Identifier of the scoreboard identity.

    isValid: boolean

    Returns true if the ScoreboardIdentity reference is still valid.

    此分数持有者的类型。

    Type of the scoreboard identity.

    方法

    • 返回 Entity

      对应的实体对象。虚拟玩家类型的分数持有者会返回 undefined

      返回此分数持有者对应的实体对象(仅当此分数持有者是一个实体或者玩家时)。

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

      若实体不存在时,抛出。