Skip to content

Class endstone::Score

ClassList > 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 .

virtual ScoreEntry endstone::Score::getEntry () const = 0

Returns:

this Score's tracked entry


function getObjective

Gets the Objective being tracked by thisScore .

virtual Objective & endstone::Score::getObjective () const = 0

Returns:

the owning objective's scoreboard


function getScoreboard

Gets the scoreboard for the associated objective.

virtual Scoreboard & endstone::Score::getScoreboard () const = 0

Returns:

the owning objective's scoreboard


function getValue

Gets the current score.

virtual Result< int > endstone::Score::getValue () const = 0

Returns:

the current score


function isScoreSet

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

virtual Result< bool > endstone::Score::isScoreSet () const = 0

Returns:

if this score has been set before


function setValue

Sets the current score.

virtual Result< void > endstone::Score::setValue (
    int score
) = 0

Parameters:

  • score New score

function ~Score

virtual endstone::Score::~Score () = default


The documentation for this class was generated from the following file include/endstone/scoreboard/score.h