Skip to Content
⚠ Under Construction
ReferenceC++ APIScore

endstone::Score

Represents a score for an objective on a scoreboard.

Functions:

NameDescription
getEntryGets the entry being tracked by this Score .
getObjectiveGets the Objective being tracked by this Score .
getScoreboardGets the scoreboard for the associated objective.
getValueGets the current score.
isScoreSetShows if this score has been set at any point in time.
setValueSets the current score.

getEntry

ScoreEntry getEntry() const

Gets the entry being tracked by this Score .

Returns:

this Score’s tracked entry

getObjective

Objective &getObjective() const

Gets the Objective being tracked by this Score .

Returns:

the owning objective’s scoreboard

getScoreboard

Scoreboard &getScoreboard() const

Gets the scoreboard for the associated objective.

Returns:

the owning objective’s scoreboard

getValue

Result<int> getValue() const

Gets the current score.

Returns:

the current score

isScoreSet

Result<bool> isScoreSet() const

Shows if this score has been set at any point in time.

Returns:

if this score has been set before

setValue

Result<void> setValue(int score)

Sets the current score.

Parameters:

  • score New score
Last updated on