Class endstone::Score¶
Represents a score for an objective on a scoreboard.
#include <endstone/scoreboard/score.h>
Public Functions¶
Type | Name |
---|---|
virtual ScoreEntry | getEntry () const = 0 Gets the entry being tracked by this Score . |
virtual Objective & | getObjective () const = 0 Gets the Objective being tracked by thisScore . |
virtual Scoreboard & | getScoreboard () const = 0 Gets the scoreboard for the associated objective. |
virtual Result< int > | getValue () const = 0 Gets the current score. |
virtual Result< bool > | isScoreSet () const = 0 Shows if this score has been set at any point in time. |
virtual Result< void > | setValue (int score) = 0 Sets the current score. |
virtual | ~Score () = default |
Public Functions Documentation¶
function getEntry¶
Gets the entry being tracked by this Score .
Returns:
this Score's tracked entry
function getObjective¶
Gets the Objective being tracked by thisScore .
Returns:
the owning objective's scoreboard
function getScoreboard¶
Gets the scoreboard for the associated objective.
Returns:
the owning objective's scoreboard
function getValue¶
Gets the current score.
Returns:
the current score
function isScoreSet¶
Shows if this score has been set at any point in time.
Returns:
if this score has been set before
function setValue¶
Sets the current score.
Parameters:
score
New score
function ~Score¶
The documentation for this class was generated from the following file include/endstone/scoreboard/score.h