Class endstone::Objective¶
ClassList > endstone > Objective
Represents an objective on a scoreboard that can show scores specific to entries.
#include <endstone/scoreboard/objective.h>
Public Functions¶
Type | Name |
---|---|
virtual Result< const Criteria * > | getCriteria () const = 0 Gets the criteria this objective tracks. |
virtual Result< std::string > | getDisplayName () const = 0 Gets the name displayed to players for this objective. |
virtual Result< DisplaySlot > | getDisplaySlot () const = 0 Gets the display slot this objective is displayed at. |
virtual Result< std::string > | getName () const = 0 Gets the name of this Objective . |
virtual Result< RenderType > | getRenderType () const = 0 |
virtual Result< std::unique_ptr< Score > > | getScore (ScoreEntry entry) const = 0 Gets an entry's Score for this objective. |
virtual Scoreboard & | getScoreboard () const = 0 Gets the scoreboard to which this objective is attached. |
virtual Result< ObjectiveSortOrder > | getSortOrder () const = 0 Gets the sort order for this objective. |
virtual Result< bool > | isDisplayed () const = 0 Gets if the objective is currently displayed in a slot. |
virtual Result< bool > | isModifiable () const = 0 Gets if the objective's scores can be modified directly by a plugin. |
virtual bool | operator!= (const Objective & other) const = 0 |
virtual bool | operator== (const Objective & other) const = 0 |
virtual Result< void > | setDisplay (std::optional< DisplaySlot > slot) = 0 Sets the display slot for this objective. This will remove it from any other display slot. |
virtual Result< void > | setDisplay (std::optional< DisplaySlot > slot, ObjectiveSortOrder order) = 0 Sets the display slot and sort order for this objective. This will remove it from any other display slot. |
virtual Result< void > | setDisplayName (std::string display_name) = 0 Sets the name displayed to players for this objective. |
virtual Result< void > | setRenderType (RenderType render_type) = 0 Sets manner in which this objective will be rendered. |
virtual Result< void > | unregister () const = 0 Unregisters this objective from the associated Scoreboard . |
virtual | ~Objective () = default |
Public Functions Documentation¶
function getCriteria¶
Gets the criteria this objective tracks.
Returns:
this objective's criteria.
function getDisplayName¶
Gets the name displayed to players for this objective.
Returns:
this objective's display name
function getDisplaySlot¶
Gets the display slot this objective is displayed at.
Returns:
the display slot for this objective
function getName¶
Gets the name of this Objective .
Returns:
this objective's name
function getRenderType¶
Gets manner in which this objective will be rendered.
Returns:
the render type
function getScore¶
Gets an entry's Score for this objective.
virtual Result< std::unique_ptr< Score > > endstone::Objective::getScore (
ScoreEntry entry
) const = 0
Parameters:
entry
Entry for the Score
Returns:
Score tracking the Objective and entry specified
function getScoreboard¶
Gets the scoreboard to which this objective is attached.
Returns:
Owning scoreboard
function getSortOrder¶
Gets the sort order for this objective.
Returns:
The sort order for this objective.
function isDisplayed¶
Gets if the objective is currently displayed in a slot.
Returns:
true if the objective is displayed
function isModifiable¶
Gets if the objective's scores can be modified directly by a plugin.
Returns:
true if scores are modifiable
function operator!=¶
function operator==¶
function setDisplay [½]¶
Sets the display slot for this objective. This will remove it from any other display slot.
Parameters:
slot
The display slot where this objective should be displayed.
function setDisplay [2/2]¶
Sets the display slot and sort order for this objective. This will remove it from any other display slot.
virtual Result< void > endstone::Objective::setDisplay (
std::optional< DisplaySlot > slot,
ObjectiveSortOrder order
) = 0
Parameters:
slot
The display slot where this objective should be displayed.order
The sort order for this objective in the display slot.
function setDisplayName¶
Sets the name displayed to players for this objective.
Parameters:
display_name
Display name to set
function setRenderType¶
Sets manner in which this objective will be rendered.
Parameters:
render_type
new render type
function unregister¶
Unregisters this objective from the associated Scoreboard .
function ~Objective¶
The documentation for this class was generated from the following file include/endstone/scoreboard/objective.h