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 const Criteria * | getCriteria () const = 0 Gets the criteria this objective tracks. |
| virtual std::optional< std::string > | getDisplayName () const = 0 Gets the name displayed to players for this objective. |
| virtual std::optional< DisplaySlot > | getDisplaySlot () const = 0 Gets the display slot this objective is displayed at. |
| virtual std::optional< std::string > | getName () const = 0 Gets the name of this Objective . |
| virtual std::optional< RenderType > | getRenderType () const = 0 |
| virtual 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 std::optional< ObjectiveSortOrder > | getSortOrder () const = 0 Gets the sort order for this objective. |
| virtual 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 void | setDisplay (std::optional< DisplaySlot > slot) = 0 Sets the display slot for this objective. This will remove it from any other display slot. |
| virtual 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 void | setDisplayName (std::string display_name) = 0 Sets the name displayed to players for this objective. |
| virtual void | setRenderType (RenderType render_type) = 0 Sets manner in which this objective will be rendered. |
| virtual 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, or nullptr if this objective has been unregistered.
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.
Parameters:
entryEntry 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 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:
slotThe 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 void endstone::Objective::setDisplay (
std::optional< DisplaySlot > slot,
ObjectiveSortOrder order
) = 0
Parameters:
slotThe display slot where this objective should be displayed.orderThe sort order for this objective in the display slot.
function setDisplayName¶
Sets the name displayed to players for this objective.
Parameters:
displayNameDisplay name to set
function setRenderType¶
Sets manner in which this objective will be rendered.
Parameters:
render_typenew render type
function unregister¶
function ~Objective¶
The documentation for this class was generated from the following file include/endstone/scoreboard/objective.h