scoreboard
Scoreboard
¶
Minecraft Scoreboard Objective representation and packet parser.
| ATTRIBUTE | DESCRIPTION |
|---|---|
name |
Unique name for the objective (max 16 chars).
TYPE:
|
display_text |
Text to be displayed for the score (max 32 chars).
TYPE:
|
score_type |
Type of score ("integer" or "hearts").
TYPE:
|
scores |
Dictionary mapping entity names to their scores. |
is_displayed |
Whether this objective is currently being displayed.
TYPE:
|
display_position |
Position where the scoreboard is displayed (0-18).
TYPE:
|
set_score
¶
remove_score
¶
remove_score(entity_name: str) -> None
Remove an entity's score.
| PARAMETER | DESCRIPTION |
|---|---|
entity_name
|
Name of the entity to remove.
TYPE:
|
get_score
¶
get_all_scores
¶
get_sorted_scores
¶
get_player_scores
¶
get_entity_scores
¶
is_hearts_type
¶
is_hearts_type() -> bool
Check if this scoreboard uses the 'hearts' type.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if score_type is "hearts", else False. |
is_integer_type
¶
is_integer_type() -> bool
Check if this scoreboard uses the 'integer' type.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if score_type is "integer", else False. |
has_scores
¶
has_scores() -> bool
Check if any scores are present.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if at least one score exists. |
score_count
¶
score_count() -> int
Get the number of entities with scores.
| RETURNS | DESCRIPTION |
|---|---|
int
|
Number of scores. |
update_display_info
¶
set_displayed
¶
get_display_position_name
¶
get_display_position_name() -> str
Get a human-readable name for the display position.
| RETURNS | DESCRIPTION |
|---|---|
str
|
Name of the display position (e.g., "sidebar", "team sidebar (color 5)"). |
is_team_sidebar
¶
is_team_sidebar() -> bool
Check if the scoreboard is displayed in a team sidebar.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if displayed in team sidebar (positions 3-18), else False. |