API reference / @jsprismarine/prismarine / entity/data/storePlayers / StorePlayers
Class: StorePlayers
Defined in: packages/prismarine/src/entity/data/storePlayers.ts:62
The server's store players, by entity id.
One for the server, not one for each dimension, because a player that changes dimension leaves one store and enters another with the same id and is still the same player.
Constructors
Constructor
new StorePlayers():
StorePlayers
Returns
StorePlayers
Methods
actorOf()
actorOf(
entity,world,blows):StorePlayerActor|undefined
Defined in: packages/prismarine/src/entity/data/storePlayers.ts:84
The actor of a store entity that is a filed player, for StoreActors.
Parameters
entity
world
blows
Returns
StorePlayerActor | undefined
The actor, or undefined for any other entity.
add()
add(
player):void
Defined in: packages/prismarine/src/entity/data/storePlayers.ts:71
Files a store player under its id, which every entity of the player is given.
Parameters
player
Returns
void
delete()
delete(
id):boolean
Defined in: packages/prismarine/src/entity/data/storePlayers.ts:76
Forgets a player that left the server.
Parameters
id
number
Returns
boolean
Whether it was filed.
of()
of(
id):StorePlayer|undefined
Defined in: packages/prismarine/src/entity/data/storePlayers.ts:66
The store player of one entity, or undefined when the id names none.
Parameters
id
number
Returns
StorePlayer | undefined