Skip to content

Scoreboard

Section notes in abi.h

Β§F scoreboard

Slots

scoreboard_op

C
bool (*scoreboard_op)(int32_t op, PierStr a, PierStr b, int64_t n, void* ctx, PierStrSink out);

PierScoreboardOp

scoreboard_op verbs (args a=objective/slot, b=target, n=value).

Name Value Description
PIER_SB_ADD_OBJECTIVE 0 a=name, b=display name β†’ out "1" Scoreboard::addObjective("dummy")
PIER_SB_REMOVE_OBJECTIVE 1 a=name Scoreboard::removeObjective
PIER_SB_LIST_OBJECTIVES 2 β†’ out SNBT [{name,display},…] Scoreboard::getObjectives
PIER_SB_GET_SCORE 3 a=objective, b=fake-player name β†’ out value Objective::getPlayerScore
PIER_SB_SET_SCORE 4 a=objective, b=name, n=value Scoreboard::modifyPlayerScore(Set)
PIER_SB_ADD_SCORE 5 a=objective, b=name, n=value … (Add)
PIER_SB_REDUCE_SCORE 6 a=objective, b=name, n=value … (Subtract)
PIER_SB_RESET_SCORE 7 a=objective, b=name Scoreboard::resetPlayerScore
PIER_SB_SET_DISPLAY 8 a=slot("sidebar"/"list"/"belowname"), b=objective setDisplayObjective
PIER_SB_CLEAR_DISPLAY 9 a=slot clearDisplayObjective