@minecraft/server
    Preparing search index...

    Class ScoreboardObjectiveBeta

    Contains objectives and participants for the scoreboard.

    Index

    Properties

    displayName: string

    Returns the player-visible name of this scoreboard objective.

    This property can throw when used.

    id: string

    Identifier of the scoreboard objective.

    This property can throw when used.

    isValid: boolean

    Returns true if the ScoreboardObjective reference is still valid.

    Methods

    • Beta

      Parameters

      • participant: string | Entity | ScoreboardIdentity

        Participant to apply the scoreboard value addition to.

      • scoreToAdd: number

      Returns number

      Adds a score to the given participant and objective.

      This function can't be called in read-only mode.

      This function can throw errors.

    • Beta

      Returns ScoreboardIdentity[]

      Returns all objective participant identities.

      This function can throw errors.

    • Beta

      Parameters

      Returns undefined | number

      Returns a specific score for a participant.

      This function can throw errors.

    • Beta

      Returns ScoreboardScoreInfo[]

      Returns specific scores for this objective for all participants.

      This function can throw errors.

    • Beta

      Parameters

      Returns boolean

      Returns if the specified identity is a participant of the scoreboard objective.

      This function can throw errors.

    • Beta

      Parameters

      Returns boolean

      Removes a participant from this scoreboard objective.

      This function can't be called in read-only mode.

      This function can throw errors.

    • Beta

      Parameters

      Returns void

      Sets a score for a participant.

      This function can't be called in read-only mode.

      This function can throw errors.