Skip to Content
⚠ Under Construction
ReferencePython APIendstone.scoreboard

endstone.scoreboard

Classes:

NameDescription
CriteriaRepresents a scoreboard criteria.
DisplaySlotLocations for displaying objectives to the player
ObjectiveRepresents an objective on a scoreboard that can show scores specific to entries.
ObjectiveSortOrderRepresents the sort order of objectives on a DisplaySlot.
ScoreRepresents a score for an objective on a scoreboard.
ScoreboardRepresents a scoreboard

Criteria

Represents a scoreboard criteria.

Classes:

NameDescription
TypeRepresents a scoreboard criteria.

Attributes:

DUMMY

DUMMY: Criteria.Type

default_render_type

default_render_type: RenderType

is_read_only

is_read_only: bool

name

name: str

Type

Type(value:int)

Represents a scoreboard criteria.

Attributes:

NameTypeDescription
DUMMYType
namestr
valueint
DUMMY
DUMMY: Criteria.Type
name
name: str
value
value: int

DisplaySlot

DisplaySlot(value:int)

Locations for displaying objectives to the player

Attributes:

BELOW_NAME

BELOW_NAME: DisplaySlot

PLAYER_LIST

PLAYER_LIST: DisplaySlot

SIDE_BAR

SIDE_BAR: DisplaySlot

name

name: str

value

value: int

Objective

Represents an objective on a scoreboard that can show scores specific to entries.

Methods:

NameDescription
get_scoreGets an entry’s Score for this objective
set_displaySets the display slot and sort order for this objective. This will remove it from any other display slot.
unregisterUnregisters this objective from the associated Scoreboard.

Attributes:

NameTypeDescription
criteriaCriteriaGets the criteria this objective tracks
display_namestrGets or sets the name displayed to players for this objective
display_slotDisplaySlot | NoneGets or sets the display slot this objective is displayed at
is_displayedboolGets if the objective is currently displayed in a slot.
is_modifiableboolGets if the objective’s scores can be modified directly by a plugin
namestrGets the name of this Objective
render_typeRenderTypeGets the manner in which this objective will be rendered.
scoreboardScoreboardGets the scoreboard to which this objective is attached
sort_orderObjectiveSortOrder | NoneGets or sets the sort order for this objective

criteria

criteria: Criteria

Gets the criteria this objective tracks

display_name

display_name: str

Gets or sets the name displayed to players for this objective

display_slot

display_slot: DisplaySlot | None

Gets or sets the display slot this objective is displayed at

is_displayed

is_displayed: bool

Gets if the objective is currently displayed in a slot.

is_modifiable

is_modifiable: bool

Gets if the objective’s scores can be modified directly by a plugin

name

name: str

Gets the name of this Objective

render_type

render_type: RenderType

Gets the manner in which this objective will be rendered.

scoreboard

scoreboard: Scoreboard

Gets the scoreboard to which this objective is attached

sort_order

sort_order: ObjectiveSortOrder | None

Gets or sets the sort order for this objective

get_score

get_score(entry:Player | Actor | str) -> Score

Gets an entry’s Score for this objective

set_display

set_display( slot: DisplaySlot | None, order: ObjectiveSortOrder | None = None ) -> None

Sets the display slot and sort order for this objective. This will remove it from any other display slot.

unregister

unregister() -> None

Unregisters this objective from the associated Scoreboard.

ObjectiveSortOrder

ObjectiveSortOrder(value:int)

Represents the sort order of objectives on a DisplaySlot.

Attributes:

ASCENDING

ASCENDING: ObjectiveSortOrder

DESCENDING

DESCENDING: ObjectiveSortOrder

name

name: str

value

value: int

Score

Represents a score for an objective on a scoreboard.

Attributes:

NameTypeDescription
entryPlayer | Actor | strGets the entry being tracked by this Score
is_score_setboolShows if this score has been set at any point in time.
objectiveObjectiveGets the Objective being tracked by this Score.
scoreboardScoreboardGets the scoreboard for the associated objective.
valueintGets or sets the current score.

entry

entry: Player | Actor | str

Gets the entry being tracked by this Score

is_score_set

is_score_set: bool

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

objective

objective: Objective

Gets the Objective being tracked by this Score.

scoreboard

scoreboard: Scoreboard

Gets the scoreboard for the associated objective.

value

value: int

Gets or sets the current score.

Scoreboard

Represents a scoreboard

Methods:

NameDescription
add_objectiveRegisters an Objective on this Scoreboard with a name displayed to players
clear_slotClears any objective in the specified slot
get_objectiveGets an Objective on this Scoreboard by name
Gets the Objective currently displayed in a DisplaySlot on this Scoreboard
get_objectives_by_criteriaGets all Objectives of a Criteria on the Scoreboard
get_scoresGets all scores for an entry on this Scoreboard
reset_scoresRemoves all scores for an entry on this Scoreboard

Attributes:

NameTypeDescription
entrieslist[Player | Actor | str]Gets all entries tracked by this Scoreboard
objectiveslist[Objective]Gets all Objectives on this Scoreboard

entries

entries: list[Player | Actor | str]

Gets all entries tracked by this Scoreboard

objectives

objectives: list[Objective]

Gets all Objectives on this Scoreboard

add_objective

add_objective( name: str, criteria: Type, display_name: str | None = None, render_type: RenderType = RenderType.INTEGER, ) -> Objective

Registers an Objective on this Scoreboard with a name displayed to players

clear_slot

clear_slot(slot:DisplaySlot) -> None

Clears any objective in the specified slot

get_objective

get_objective(name:str) -> Objective

Gets an Objective on this Scoreboard by name

get_objective(slot:DisplaySlot) -> Objective

Gets the Objective currently displayed in a DisplaySlot on this Scoreboard

get_objectives_by_criteria

get_objectives_by_criteria(criteria:Type) -> list[Objective]

Gets all Objectives of a Criteria on the Scoreboard

get_scores

get_scores(entry:Player | Actor | str) -> list[Score]

Gets all scores for an entry on this Scoreboard

reset_scores

reset_scores(entry:Player | Actor | str) -> None

Removes all scores for an entry on this Scoreboard

Last updated on