[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) / ScriptPlayerListNames

# Class: ScriptPlayerListNames

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

The player list names the packs of one runtime set. The packs' scripts stop together, on a
reload or a shutdown, so the runtime gives every name back then. A player who leaves takes
their entry with them, and a rejoin builds a new one from the login name.

## Constructors

### Constructor

> **new ScriptPlayerListNames**(`members`): `ScriptPlayerListNames`

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

#### Parameters

##### members

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

#### Returns

`ScriptPlayerListNames`

## Methods

### playerLeft()

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

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

Forgets a player's name as they leave, since their entry goes with them.

#### Parameters

##### player

`string`

#### Returns

`void`

***

### reset()

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

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

Gives a player their login name back. A player whose name no pack set is left alone.

#### Parameters

##### player

`string`

#### Returns

`void`

***

### resetAll()

> **resetAll**(): `void`

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

Gives every player their login name back, as the scripts stop.

#### Returns

`void`

***

### set()

> **set**(`player`, `present`, `name`): `void`

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

Shows a name for a player.

#### Parameters

##### player

`string`

##### present

`boolean`

Whether the player is still in the world. One who left has no entry to rename.

##### name

`string`

#### Returns

`void`
