[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/script-host](https://jsprismarine.dev/api/@jsprismarine/script-host/index.md) / [host/jsprismarineMembers](https://jsprismarine.dev/api/@jsprismarine/script-host/host/jsprismarineMembers/index.md) / ScriptBossBars

# Class: ScriptBossBars

Defined in: [script-host/src/host/jsprismarineMembers.ts:302](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L302)

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:308](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L308)

#### Parameters

##### members

[`JsprismarineServerMembers`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/jsprismarineMembers/index.md#jsprismarineservermembers)

#### Returns

`ScriptBossBars`

## Methods

### hide()

> **hide**(`id`): `void`

Defined in: [script-host/src/host/jsprismarineMembers.ts:335](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L335)

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:353](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L353)

Takes down every bar, as the scripts stop.

#### Returns

`void`

***

### isShown()

> **isShown**(`id`): `boolean`

Defined in: [script-host/src/host/jsprismarineMembers.ts:343](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L343)

Whether a bar is still shown.

#### Parameters

##### id

`number`

#### Returns

`boolean`

***

### playerLeft()

> **playerLeft**(`player`): `void`

Defined in: [script-host/src/host/jsprismarineMembers.ts:348](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L348)

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:317](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L317)

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`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/jsprismarineMembers/index.md#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:327](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/script-host/src/host/jsprismarineMembers.ts#L327)

Changes what a bar shows. A bar that is gone is left alone.

#### Parameters

##### id

`number`

##### options

`Partial`\<[`ScriptBossBarState`](https://jsprismarine.dev/api/@jsprismarine/script-host/host/jsprismarineMembers/index.md#scriptbossbarstate)\>

#### Returns

`void`
