API reference / @jsprismarine/script-host / host/jsprismarineMembers / ScriptBossBars
Class: ScriptBossBars
Defined in: script-host/src/host/jsprismarineMembers.ts:261
The boss bars the packs of one runtime show. The packs' scripts stop together, on a reload or a shutdown, so the runtime takes every bar down then, and a player's bars when they leave.
Constructors
Constructor
new ScriptBossBars(
members):ScriptBossBars
Defined in: script-host/src/host/jsprismarineMembers.ts:267
Parameters
members
Returns
ScriptBossBars
Methods
hide()
hide(
id):void
Defined in: script-host/src/host/jsprismarineMembers.ts:294
Takes a bar down. A bar that is gone is left alone.
Parameters
id
number
Returns
void
hideAll()
hideAll():
void
Defined in: script-host/src/host/jsprismarineMembers.ts:312
Takes down every bar, as the scripts stop.
Returns
void
isShown()
isShown(
id):boolean
Defined in: script-host/src/host/jsprismarineMembers.ts:302
Whether a bar is still shown.
Parameters
id
number
Returns
boolean
playerLeft()
playerLeft(
player):void
Defined in: script-host/src/host/jsprismarineMembers.ts:307
Takes down every bar on a player's screen, as they leave.
Parameters
player
string
Returns
void
show()
show(
player,present,options):number
Defined in: script-host/src/host/jsprismarineMembers.ts:276
Shows a bar to a player.
Parameters
player
string
present
boolean
Whether the player is still in the world. A bar for one who left never shows.
options
Partial<ScriptBossBarState>
Returns
number
The bar's id, or 0 for a bar that did not show.
update()
update(
id,options):void
Defined in: script-host/src/host/jsprismarineMembers.ts:286
Changes what a bar shows. A bar that is gone is left alone.
Parameters
id
number
options
Partial<ScriptBossBarState>
Returns
void