Skip to content

Scoreboard

Data Type

An object used for getting the score of a score holder from a scoreboard objective.

Note

If the score holder referenced in the name field does not exist, the data type will return a value of 0.

Caution

Currently, the name field of the data type does not accept target selectors.

Fields

Field Type Default Description
name String The name of the score holder.
objective String The name of the scoreboard objective.

Examples

"score": {
    "name": "aTestScoreHolder",
    "objective": "example"
}

This example will get the score of the aTestScoreHolder score holder from the example scoreboard objective.

"score": {
    "name": "#hiddenScoreHolder",
    "objective": "example"
}

This example will get the score of the #hiddenScoreHolder score holder from the example scoreboard objective.