endstone::Score
Represents a score for an objective on a scoreboard.
Functions:
| Name | Description |
|---|---|
getEntry | Gets the entry being tracked by this Score . |
getObjective | Gets the Objective being tracked by this Score . |
getScoreboard | Gets the scoreboard for the associated objective. |
getValue | Gets the current score. |
isScoreSet | Shows if this score has been set at any point in time. |
setValue | Sets the current score. |
getEntry
ScoreEntry getEntry() constGets the entry being tracked by this Score .
Returns:
this Score’s tracked entry
getObjective
Objective &getObjective() constGets the Objective being tracked by this Score .
Returns:
the owning objective’s scoreboard
getScoreboard
Scoreboard &getScoreboard() constGets the scoreboard for the associated objective.
Returns:
the owning objective’s scoreboard
getValue
Result<int> getValue() constGets the current score.
Returns:
the current score
isScoreSet
Result<bool> isScoreSet() constShows 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:
scoreNew score
Last updated on