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

NameDescription
BarColor
BarFlag
BarStyle
BossBar

Represents a boss bar that is displayed to players.

classBarColor

Bases: Enum

BarColor()

attrBLUE

BLUE = 1

attrGREEN

GREEN = 3

attrPINK

PINK = 0

attrPURPLE

PURPLE = 5

attrREBECCA_PURPLE

REBECCA_PURPLE = 6

attrRED

RED = 2

attrWHITE

WHITE = 7

attrYELLOW

YELLOW = 4

classBarFlag

Bases: Enum

BarFlag()

Attributes

NameTypeDescription
CREATE_FOG

Creates fog around the world.

DARKEN_SKY

Darkens the sky like during fighting a wither.

attrCREATE_FOG

CREATE_FOG = 1

Creates fog around the world.

attrDARKEN_SKY

DARKEN_SKY = 0

Darkens the sky like during fighting a wither.

classBarStyle

Bases: Enum

BarStyle()

Attributes

NameTypeDescription
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 = 2

Splits the boss bar into 10 segments

attrSEGMENTED_12

SEGMENTED_12 = 3

Splits the boss bar into 12 segments

attrSEGMENTED_20

SEGMENTED_20 = 4

Splits the boss bar into 20 segments

attrSEGMENTED_6

SEGMENTED_6 = 1

Splits the boss bar into 6 segments

attrSOLID

SOLID = 0

Makes the boss bar solid (no segments)

classBossBar

BossBar()

Represents a boss bar that is displayed to players.

Methods

NameDescription
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

NameTypeDescription
colorBarColor

The color of this boss bar.

is_visiblebool

If the boss bar is displayed to attached players.

playerslist[Player]

Returns all players viewing this boss bar.

progressfloat

The progress of the bar between 0.0 and 1.0.

styleBarStyle

The style of this boss bar.

titlestr

The title of this boss bar.

attrcolorproperty

color: BarColor

The color of this boss bar.

attris_visibleproperty

is_visible: bool

If the boss bar is displayed to attached players.

attrplayersproperty

players: list[Player]

Returns all players viewing this boss bar.

attrprogressproperty

progress: float

The progress of the bar between 0.0 and 1.0.

attrstyleproperty

style: BarStyle

The style of this boss bar.

attrtitleproperty

title: str

The title of this boss bar.

methadd_flag

add_flag(flag: BarFlag) -> None

Adds an optional flag to this boss bar.

methadd_player

add_player(player: Player) -> None

Adds the player to this boss bar causing it to display on their screen.

methhas_flag

has_flag(flag: BarFlag) -> bool

Checks whether this boss bar has the passed flag set.

methremove_all

remove_all() -> None

Removes all players from this boss bar.

methremove_flag

remove_flag(flag: BarFlag) -> None

Removes an existing flag on this boss bar.

methremove_player

remove_player(player: Player) -> None

Removes the player from this boss bar causing it to be removed from their screen.

On this page