Skip to content

API reference / @jsprismarine/script-host / host/jsprismarineMembers / ScriptPlayerListNames

Class: ScriptPlayerListNames ​

Defined in: script-host/src/host/jsprismarineMembers.ts:322

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:327

Parameters ​

members ​

JsprismarineServerMembers

Returns ​

ScriptPlayerListNames

Methods ​

playerLeft() ​

playerLeft(player): void

Defined in: script-host/src/host/jsprismarineMembers.ts:348

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:342

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:353

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:335

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