Scoreboard
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.
Fields
| Field | Type | Default | Description |
|---|---|---|---|
name |
String | The name of the score holder or a target selector. | |
objective |
String | The name of the scoreboard objective. |
Examples
This example will get the score of the aTestScoreHolder score holder from the example scoreboard objective.
This example will get the score of the #hiddenScoreHolder score holder from the example scoreboard objective.