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() 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