[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / [entity/data/storePlayers](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storePlayers/index.md) / StorePlayers

# Class: StorePlayers

Defined in: [packages/prismarine/src/entity/data/storePlayers.ts:62](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storePlayers.ts#L62)

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`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storePlayers/classes/StorePlayerActor.md) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/storePlayers.ts:84](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storePlayers.ts#L84)

The actor of a store entity that is a filed player, for `StoreActors`.

#### Parameters

##### entity

[`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md)

##### world

[`World`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/World/classes/World.md)

##### blows

[`StoreActorBlows`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storeActors/index.md#storeactorblows)

#### Returns

[`StorePlayerActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storePlayers/classes/StorePlayerActor.md) \| `undefined`

The actor, or undefined for any other entity.

***

### add()

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

Defined in: [packages/prismarine/src/entity/data/storePlayers.ts:71](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storePlayers.ts#L71)

Files a store player under its id, which every entity of the player is given.

#### Parameters

##### player

[`StorePlayer`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/classes/StorePlayer.md)

#### Returns

`void`

***

### delete()

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

Defined in: [packages/prismarine/src/entity/data/storePlayers.ts:76](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storePlayers.ts#L76)

Forgets a player that left the server.

#### Parameters

##### id

`number`

#### Returns

`boolean`

Whether it was filed.

***

### of()

> **of**(`id`): [`StorePlayer`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/classes/StorePlayer.md) \| `undefined`

Defined in: [packages/prismarine/src/entity/data/storePlayers.ts:66](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/data/storePlayers.ts#L66)

The store player of one entity, or undefined when the id names none.

#### Parameters

##### id

`number`

#### Returns

[`StorePlayer`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/classes/StorePlayer.md) \| `undefined`
