endstone.boss
Classes relating to the boss bars that appear at the top of the player's screen.
Classes relating to the boss bars that appear at the top of the player's screen.
Classes
classBarColor
Bases: Enum
BarColor()classBarFlag
Bases: Enum
BarFlag()Attributes
| Name | Type | Description |
|---|---|---|
CREATE_FOG | Creates fog around the world. | |
DARKEN_SKY | Darkens the sky like during fighting a wither. |
attrCREATE_FOG
CREATE_FOG = 1Creates fog around the world.
attrDARKEN_SKY
DARKEN_SKY = 0Darkens the sky like during fighting a wither.
classBarStyle
Bases: Enum
BarStyle()Attributes
| Name | Type | Description |
|---|---|---|
SEGMENTED_10 | Splits the boss bar into 10 segments | |
SEGMENTED_12 | Splits the boss bar into 12 segments | |
SEGMENTED_20 | Splits the boss bar into 20 segments | |
SEGMENTED_6 | Splits the boss bar into 6 segments | |
SOLID | Makes the boss bar solid (no segments) |
attrSEGMENTED_10
SEGMENTED_10 = 2Splits the boss bar into 10 segments
attrSEGMENTED_12
SEGMENTED_12 = 3Splits the boss bar into 12 segments
attrSEGMENTED_20
SEGMENTED_20 = 4Splits the boss bar into 20 segments
attrSEGMENTED_6
SEGMENTED_6 = 1Splits the boss bar into 6 segments
attrSOLID
SOLID = 0Makes the boss bar solid (no segments)
classBossBar
BossBar()Represents a boss bar that is displayed to players.
Methods
| Name | Description |
|---|---|
add_flag | Adds an optional flag to this boss bar. |
add_player | Adds the player to this boss bar causing it to display on their screen. |
has_flag | Checks whether this boss bar has the passed flag set. |
remove_all | Removes all players from this boss bar. |
remove_flag | Removes an existing flag on this boss bar. |
remove_player | Removes the player from this boss bar causing it to be removed from their screen. |
Attributes
| Name | Type | Description |
|---|---|---|
color | BarColor | The color of this boss bar. |
is_visible | bool | If the boss bar is displayed to attached players. |
players | list[Player] | Returns all players viewing this boss bar. |
progress | float | The progress of the bar between 0.0 and 1.0. |
style | BarStyle | The style of this boss bar. |
title | str | The title of this boss bar. |
attrcolorproperty
color: BarColorThe color of this boss bar.
attris_visibleproperty
is_visible: boolIf the boss bar is displayed to attached players.
attrplayersproperty
Returns all players viewing this boss bar.
attrprogressproperty
progress: floatThe progress of the bar between 0.0 and 1.0.
attrstyleproperty
style: BarStyleThe style of this boss bar.
attrtitleproperty
title: strThe title of this boss bar.
methadd_flag
add_flag(flag: BarFlag) -> NoneAdds an optional flag to this boss bar.
methadd_player
add_player(player: Player) -> NoneAdds the player to this boss bar causing it to display on their screen.
methhas_flag
Checks whether this boss bar has the passed flag set.
methremove_all
remove_all() -> NoneRemoves all players from this boss bar.
methremove_flag
remove_flag(flag: BarFlag) -> NoneRemoves an existing flag on this boss bar.
methremove_player
remove_player(player: Player) -> NoneRemoves the player from this boss bar causing it to be removed from their screen.