Skip to main content

Scoreboard (Entity Condition Type)

Compares the entity's score in a scoreboard objective with a number.

Type ID: apoli:scoreboard

note

If the player has no score in the objective, this condition is always false, even with "!=". Combine a "!=" check with a "==" check to test whether the player has no score set, for example after joining a world for the first time or having their scores reset.

warning

This condition only works on the server, so it can't be used in fields that are evaluated on the client.

Fields

FieldTypeDefaultDescription
nameStringoptionalA score holder to read the score of, instead of the entity.
objectiveStringrequiredThe name of the scoreboard objective to read.
comparisonComparisonrequiredHow the score is compared with compare_to.
compare_toIntegerrequiredThe number the score is compared with.

Examples

"condition": {
    "type": "apoli:scoreboard",
    "objective": "obj",
    "comparison": ">",
    "compare_to": 3
}

This checks whether the player's score in the obj objective is greater than 3.