[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / [entity/storePlayer](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/index.md) / StorePlayer

# Class: StorePlayer

Defined in: [packages/prismarine/src/entity/storePlayer.ts:94](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L94)

A store player, with its entity while one is in a store.

## Implements

- [`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource)
- [`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget)

## Constructors

### Constructor

> **new StorePlayer**(`id`, `identity`): `StorePlayer`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:151](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L151)

#### Parameters

##### id

`number`

The entity id drawn at the login, which every entity of this player is given.

##### identity

[`StorePlayerIdentity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/index.md#storeplayeridentity)

Who the player is.

#### Returns

`StorePlayer`

## Properties

### attributes

> `readonly` **attributes**: `Attributes`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:99](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L99)

The client's attribute table. While the player is in a store its health entry is not read,
because health is the entity's; while it is in none, the entry holds it.

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`attributes`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#attributes-1)

***

### device

> **device**: [`Device`](https://jsprismarine.dev/api/@jsprismarine/prismarine/utils/Device/classes/Device.md) \| `null` = `null`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:109](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L109)

The device the login named, or null when it said nothing.

***

### id

> `readonly` **id**: `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:152](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L152)

The entity id drawn at the login, which every entity of this player is given.

***

### javaSkinParts

> **javaSkinParts**: `number` \| `undefined` = `undefined`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:105](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L105)

The parts of its skin a Java player shows, from its client's settings.

***

### javaTextures

> **javaTextures**: \{ `signature`: `string` \| `null`; `value`: `string`; \} \| `undefined` = `undefined`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:103](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L103)

A Java player's signed `textures` property, which Java clients draw the skin from.

***

### locale

> **locale**: `string` = `'en_US'`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:112](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L112)

The language the login named, such as `en_US`, which a script reads as the client's locale.

***

### metadata

> `readonly` **metadata**: [`Metadata`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/Metadata.md)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:120](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L120)

The actor metadata the components keep air, breathing and sprinting in, and which the
player's own client is shown while the player is in no store. In a store, clients are shown
the actor's metadata, which reads these from the components.

***

### platformChatId

> **platformChatId**: `string` = `''`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:114](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L114)

The platform chat id, which the login handler does not read yet and leaves empty.

***

### skin

> **skin**: [`Skin`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/Skin.md) \| `null` = `null`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:101](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L101)

The skin the login carried, which a skin change replaces.

## Accessors

### entity

#### Get Signature

> **get** **entity**(): [`DataEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/DataEntity/classes/DataEntity.md) \| `undefined`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:178](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L178)

The `minecraft:player` entity while the player is in a store, or undefined while it is in none.

##### Returns

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

***

### gamemode

#### Get Signature

> **get** **gamemode**(): [`Gametype`](https://jsprismarine.dev/api/@jsprismarine/minecraft/index.md#gametype)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:283](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L283)

The game mode, a logged component field the survival systems read.

##### Returns

[`Gametype`](https://jsprismarine.dev/api/@jsprismarine/minecraft/index.md#gametype)

#### Set Signature

> **set** **gamemode**(`gamemode`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:287](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L287)

##### Parameters

###### gamemode

[`Gametype`](https://jsprismarine.dev/api/@jsprismarine/minecraft/index.md#gametype)

##### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`gamemode`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#gamemode-1)

***

### headYaw

#### Get Signature

> **get** **headYaw**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:167](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L167)

Where the head looks, which the client reports apart from the body's yaw. Logged while in a store.

##### Returns

`number`

#### Set Signature

> **set** **headYaw**(`headYaw`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:171](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L171)

##### Parameters

###### headYaw

`number`

##### Returns

`void`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`headYaw`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#headyaw)

***

### heldEntity

#### Get Signature

> **get** **heldEntity**(): [`HeldEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/index.md#heldentity)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:183](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L183)

What the player keeps of its entity while it is in no store, which its next entry starts from.

##### Returns

[`HeldEntity`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/index.md#heldentity)

***

### persistentNbt

#### Get Signature

> **get** **persistentNbt**(): [`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:400](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L400)

The actor record tags this server does not model, which a script's dynamic properties live
in: the entity's while the player is in a store, and what the player holds for the next
store otherwise. A new compound on every read; change one by assigning it back.

##### Returns

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

#### Set Signature

> **set** **persistentNbt**(`tags`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:405](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L405)

The actor record tags this server does not model, which a script's dynamic properties live
in, or null when the player has none.

##### Parameters

###### tags

[`NBTTagCompound`](https://jsprismarine.dev/api/@jsprismarine/nbt/classes/NBTTagCompound.md) \| `null`

##### Returns

`void`

The actor record tags this server does not model, which a script's dynamic properties live
in, or null when the player has none.

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`persistentNbt`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#persistentnbt-1)

***

### pitch

#### Get Signature

> **get** **pitch**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:322](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L322)

##### Returns

`number`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`pitch`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#pitch)

***

### yaw

#### Get Signature

> **get** **yaw**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:326](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L326)

##### Returns

`number`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`yaw`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#yaw)

## Methods

### addFood()

> **addFood**(`food`, `saturation?`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:542](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L542)

Feeds the player, as eating does.

#### Parameters

##### food

`number`

##### saturation?

`number` = `0`

#### Returns

`void`

***

### attach()

> **attach**(`entity`, `systems?`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:196](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L196)

Takes an entity that is entering a store as this player's, before it enters: the position,
the look, the health, the tags and the status effects the player held are written onto it,
and from now on the player's writes are logged there and the store's systems run it.

#### Parameters

##### entity

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

The entity, built with this player's id and not yet entered.

##### systems?

`Pick`\<[`PlayerSystems`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/playerSystems/classes/PlayerSystems.md), `"attach"`\>

The player systems of the entity's runtime; left out, nothing is logged.

#### Returns

`void`

#### Throws

When the entity has another id, or the player already has an entity.

***

### beginItemUse()

> **beginItemUse**(`tick`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:474](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L474)

Notes that the player started holding an item down. Bedrock says only "started" and later
"released", so the charge of a bow is the time between them, measured here.

#### Parameters

##### tick

`number`

The server tick it began on.

#### Returns

`void`

***

### claimUpdate()

> **claimUpdate**(`tick`): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:592](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L592)

Claims the player's one actor update of a server tick. The player keeps the claim rather
than its actor, because a dimension change mid-tick gives it a new actor in a world the
level ticks later, which would otherwise update it a second time.

#### Parameters

##### tick

`number`

#### Returns

`boolean`

Whether this is the first claim of `tick`.

***

### detach()

> **detach**(`record`): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:233](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L233)

Lets go of the entity before it leaves its store, keeping what the next store needs: the
position, the look, the health, and the entity's record, tags and status effects.

#### Parameters

##### record

[`DataEntityRecord`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/persistence/index.md#dataentityrecord)

The entity's record as it is now, which the next store restores.

#### Returns

`boolean`

Whether the player had an entity.

***

### getComponents()

> **getComponents**(): [`PlayerComponents`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/playerComponents/classes/PlayerComponents.md)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:391](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L391)

The player's logged component state, which the survival rules write through.

#### Returns

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

***

### getCraftingInput()

> **getCraftingInput**(): [`CraftingInput`](https://jsprismarine.dev/api/@jsprismarine/prismarine/crafting/CraftingInput/classes/CraftingInput.md)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:381](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L381)

What is sitting in the crafting slots, whether the inventory's four or a table's nine.

#### Returns

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

***

### getEquipment()

> **getEquipment**(): [`ViewableEquipment`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/predicateView/index.md#viewableequipment)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:386](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L386)

What the player wears and holds.

#### Returns

[`ViewableEquipment`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/predicateView/index.md#viewableequipment)

***

### getExperience()

> **getExperience**(): [`ExperienceHolder`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/Experience/index.md#experienceholder)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:454](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L454)

The experience, as the level and the bar the client is sent, written through logged setters.

#### Returns

[`ExperienceHolder`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/Experience/index.md#experienceholder)

***

### getFallDistance()

> **getFallDistance**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:449](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L449)

How far the player has fallen since it was last supported. A blow struck while this is
above zero is a critical: a player rising through a jump is not falling.

#### Returns

`number`

***

### getFeetY()

> **getFeetY**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:347](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L347)

The bottom of the player's body, the eye height below what it reports.

#### Returns

`number`

***

### getFood()

> **getFood**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:522](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L522)

Food, out of 20.

#### Returns

`number`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getFood`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getfood)

***

### getHealth()

> **getHealth**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:490](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L490)

The health, the entity's while the player is in a store.

#### Returns

`number`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`getHealth`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#gethealth-1)

***

### getInventory()

> **getInventory**(): [`HumanInventory`](https://jsprismarine.dev/api/@jsprismarine/prismarine/inventory/HumanInventory/classes/HumanInventory.md)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:376](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L376)

Everything the player carries.

#### Returns

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

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`getInventory`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getinventory-1)

***

### getMaxHealth()

> **getMaxHealth**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:496](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L496)

The most health the player can have, which the entity's type decides while it is in a store.

#### Returns

`number`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getMaxHealth`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getmaxhealth)

***

### getName()

> **getName**(): `string`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:297](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L297)

The display name.

#### Returns

`string`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getName`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getname)

***

### getPortalCooldown()

> **getPortalCooldown**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:599](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L599)

Ticks left before the player may enter a portal again.

#### Returns

`number`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getPortalCooldown`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getportalcooldown)

***

### getPosition()

> **getPosition**(): [`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:312](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L312)

The eye, `EYE_HEIGHT` above the feet, which is what a player reports.

#### Returns

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/math/classes/Vector3.md)

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getPosition`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getposition)

***

### getRuntimeId()

> **getRuntimeId**(): `bigint`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:273](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L273)

The entity id as the wire carries it, which every entity query knows the player by.

#### Returns

`bigint`

***

### getSaturation()

> **getSaturation**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:532](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L532)

The hidden buffer spent before food.

#### Returns

`number`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getSaturation`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getsaturation)

***

### getSpawnPoint()

> **getSpawnPoint**(): [`StoredSpawnPoint`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/RespawnPoint/index.md#storedspawnpoint) \| `undefined`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:547](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L547)

The player's own spawn point, or undefined for the world spawn.

#### Returns

[`StoredSpawnPoint`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/RespawnPoint/index.md#storedspawnpoint) \| `undefined`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getSpawnPoint`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getspawnpoint)

***

### getStatusEffects()

> **getStatusEffects**(): readonly [`StatusEffect`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffect)[]

Defined in: [packages/prismarine/src/entity/storePlayer.ts:421](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L421)

The status effects on the player, the entity's while it is in a store.

#### Returns

readonly [`StatusEffect`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/StatusEffect/index.md#statuseffect)[]

***

### getSubject()

> **getSubject**(): [`Subject`](https://jsprismarine.dev/api/@jsprismarine/prismarine/identity/Subject/index.md#subject)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:307](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L307)

Who the player is to the permission files.

#### Returns

[`Subject`](https://jsprismarine.dev/api/@jsprismarine/prismarine/identity/Subject/index.md#subject)

***

### getTags()

> **getTags**(): readonly `string`[]

Defined in: [packages/prismarine/src/entity/storePlayer.ts:416](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L416)

The `/tag` tags the player carries, the entity's while it is in a store.

#### Returns

readonly `string`[]

***

### getTimeSinceRest()

> **getTimeSinceRest**(): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:576](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L576)

Ticks since the player last slept or died, Java's `Stats.TIME_SINCE_REST`, which decides
whether phantoms come for them. A statistic, as in Java, kept beside the player's logged
components rather than in them, so a tick spent awake writes nothing to the change log.

#### Returns

`number`

#### Java Source

Stats.TIME_SINCE_REST

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getTimeSinceRest`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#gettimesincerest)

***

### getType()

> **getType**(): `string`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:278](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L278)

The type of the player's entity, `minecraft:player`.

#### Returns

`string`

***

### getUUID()

> **getUUID**(): [`UUIDValue`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/UUIDValue.md)

Defined in: [packages/prismarine/src/entity/storePlayer.ts:292](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L292)

The protocol identity the login carried.

#### Returns

[`UUIDValue`](https://jsprismarine.dev/api/@jsprismarine/protocol/classes/UUIDValue.md)

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`getUUID`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#getuuid)

***

### getVelocity()

> **getVelocity**(): `object`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:318](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L318)

How fast the player moves, in blocks a tick; at rest while the player is in no store.

#### Returns

`object`

##### x

> `readonly` **x**: `number`

##### y

> `readonly` **y**: `number`

##### z

> `readonly` **z**: `number`

***

### getXUID()

> **getXUID**(): `string` \| `null`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:302](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L302)

The XUID, or null when the login carried none, as `keyOfPlayer` reads it.

#### Returns

`string` \| `null`

***

### hasSeenCredits()

> **hasSeenCredits**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:560](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L560)

Whether the player has watched the end credits.

#### Returns

`boolean`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`hasSeenCredits`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#hasseencredits)

***

### isFlying()

> **isFlying**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:512](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L512)

Whether the player is flying.

#### Returns

`boolean`

#### Implementation of

[`PlayerRecordSource`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordsource).[`isFlying`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#isflying)

***

### isGliding()

> **isGliding**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:431](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L431)

Whether the player is gliding on an elytra, which the server allowed and has not ended.

#### Returns

`boolean`

***

### isOnGround()

> **isOnGround**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:361](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L361)

Whether the client last reported the player on the ground: the body's `on_ground`
condition, false while the player is in no store.

#### Returns

`boolean`

***

### isSleeping()

> **isSleeping**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:441](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L441)

Whether the player lies in a bed, which its entity keeps as the bed it sleeps in.

#### Returns

`boolean`

***

### isSneaking()

> **isSneaking**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:436](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L436)

Whether the client last reported the player sneaking.

#### Returns

`boolean`

***

### isSprinting()

> **isSprinting**(): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:426](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L426)

Whether the client last reported the player sprinting.

#### Returns

`boolean`

***

### placeAt()

> **placeAt**(`recorded`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:334](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L334)

Puts the player where a record says its eyes were.

#### Parameters

##### recorded

[`RecordedPosition`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#recordedposition)

The eye position and the look.

#### Returns

`void`

***

### release()

> **release**(`entity`): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:261](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L261)

Lets go of an entity whose entry into its store was undone, which leaves the player as it
was before [StorePlayer.attach](#attach): in no store, holding what it held then. Unlike
[StorePlayer.detach](#detach), it keeps no record, so the next entry starts the way this one did.

#### Parameters

##### entity

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

The entity the undone entry added, which the undo has taken out again.

#### Returns

`boolean`

Whether it was the player's entity.

***

### restoreFlying()

> **restoreFlying**(`flying`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:517](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L517)

Writes the flying flag; nothing is sent.

#### Parameters

##### flying

`boolean`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`restoreFlying`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#restoreflying)

***

### restoreHealth()

> **restoreHealth**(`health`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:502](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L502)

Writes the health, held to its maximum.

#### Parameters

##### health

`number`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`restoreHealth`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#restorehealth)

***

### setAttributeValue()

> **setAttributeValue**(`name`, `value`): `boolean`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:463](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L463)

Sets an attribute, through the component field it is kept in when it has one, so the write
is logged.

#### Parameters

##### name

`string`

##### value

`number`

#### Returns

`boolean`

Whether the value changed.

***

### setFood()

> **setFood**(`food`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:527](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L527)

Writes food, held inside the attribute's bounds.

#### Parameters

##### food

`number`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`setFood`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#setfood)

***

### setPortalCooldown()

> **setPortalCooldown**(`ticks`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:604](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L604)

Starts the portal cooldown, in whole ticks and never below zero, as a live player's.

#### Parameters

##### ticks

`number`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`setPortalCooldown`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#setportalcooldown)

***

### setSaturation()

> **setSaturation**(`saturation`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:537](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L537)

Writes saturation, which never exceeds food, as a live player's does.

#### Parameters

##### saturation

`number`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`setSaturation`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#setsaturation)

***

### setSeenCredits()

> **setSeenCredits**(`seen`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:565](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L565)

Records whether the player has watched the end credits.

#### Parameters

##### seen

`boolean`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`setSeenCredits`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#setseencredits)

***

### setSpawnPoint()

> **setSpawnPoint**(`spawn`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:555](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L555)

Moves the player's own spawn point, or clears it back to the world spawn. A frozen copy is
stored, so the caller's object cannot move the point later without a logged write.

#### Parameters

##### spawn

[`StoredSpawnPoint`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/RespawnPoint/index.md#storedspawnpoint) \| `undefined`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`setSpawnPoint`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#setspawnpoint)

***

### setTimeSinceRest()

> **setTimeSinceRest**(`ticks`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:581](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L581)

Sets the ticks since the player last slept or died, as the rest clock and a saved record do.

#### Parameters

##### ticks

`number`

#### Returns

`void`

#### Implementation of

[`PlayerRecordTarget`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#playerrecordtarget).[`setTimeSinceRest`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/playerRecord/index.md#settimesincerest)

***

### standAt()

> **standAt**(`feet`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:352](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L352)

Puts the player's feet at a position, keeping the look.

#### Parameters

##### feet

[`EntityPosition`](https://jsprismarine.dev/api/@jsprismarine/entities/index.md#entityposition)

#### Returns

`void`

***

### takeItemUseTicks()

> **takeItemUseTicks**(`tick`): `number`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:483](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L483)

How long the current use has lasted, in ticks, and forgets it.

#### Parameters

##### tick

`number`

The server tick it ended on.

#### Returns

`number`

Ticks held, or zero if nothing was being held.

***

### watchSlots()

> **watchSlots**(`watcher`): `void`

Defined in: [packages/prismarine/src/entity/storePlayer.ts:371](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/entity/storePlayer.ts#L371)

Hears every later write to a slot of the player's inventory, whether or not the player is
in a store, with the slot's logged value before and after it. The session joined to this
player watches it for the advancement trigger a slot change raises.

#### Parameters

##### watcher

[`SlotWatcher`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/storePlayer/index.md#slotwatcher)

Hears each write. It replaces any watcher set before.

#### Returns

`void`
