@minecraft
    Preparing search index...

    Class ScoreboardObjective

    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

    • World mutation

      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 throw errors.