Skip to content

API reference / @jsprismarine/prismarine / entity/data/storePlayers / DetachedPlayerView

Class: DetachedPlayerView ​

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:374

A store player in no store, as its own client is shown it: from the login to SetLocalPlayerAsInitialized, and between the two stores of a dimension change. Its position, look and status effects are what the player holds of its entity, its metadata the components' own, and nobody else is shown it, because no world holds it.

Implements ​

Constructors ​

Constructor ​

new DetachedPlayerView(player, facts): DetachedPlayerView

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:380

Parameters ​

player ​

StorePlayer

The store player.

facts ​

What the view cannot read off the player: the type's box, which the metadata carries, and whether the permission service lists the player as an operator.

box ​

() => EntityBox

commandLevel ​

() => CommandPermissionLevel

isOp ​

() => boolean

Returns ​

DetachedPlayerView

Properties ​

player ​

readonly player: StorePlayer

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:381

The store player.

Accessors ​

attributes ​

Get Signature ​

get attributes(): Attributes

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:432

The client's attribute table.

Returns ​

Attributes

The attributes a client is sent.

Implementation of ​

ShownPlayer.attributes


device ​

Get Signature ​

get device(): Device | null

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:469

The device the client logged in from, or null when it said nothing.

Returns ​

Device | null

The device the client logged in from, or null when it said nothing.

Implementation of ​

ShownPlayer.device


gamemode ​

Get Signature ​

get gamemode(): Gametype

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:477

Returns ​

Gametype

Implementation of ​

ShownPlayer.gamemode


headYaw ​

Get Signature ​

get headYaw(): number

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:413

Returns ​

number

Implementation of ​

ShownPlayer.headYaw


metadata ​

Get Signature ​

get metadata(): Metadata

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:418

The components' metadata, with the player's box and whether its game mode lets it fly.

Returns ​

Metadata

The actor metadata a client is sent, flags and properties both.

Implementation of ​

ShownPlayer.metadata


pitch ​

Get Signature ​

get pitch(): number

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:405

Returns ​

number

Implementation of ​

ShownPlayer.pitch


platformChatId ​

Get Signature ​

get platformChatId(): string

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:465

Returns ​

string

Implementation of ​

ShownPlayer.platformChatId


skin ​

Get Signature ​

get skin(): Skin | null

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:473

Returns ​

Skin | null

Implementation of ​

ShownPlayer.skin


xuid ​

Get Signature ​

get xuid(): string

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:461

Returns ​

string

Implementation of ​

ShownPlayer.xuid


yaw ​

Get Signature ​

get yaw(): number

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:409

Returns ​

number

Implementation of ​

ShownPlayer.yaw

Methods ​

getCommandLevel() ​

getCommandLevel(): CommandPermissionLevel

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:487

The command level the player runs at, which sets the command permission other clients see.

Returns ​

CommandPermissionLevel

Implementation of ​

ShownPlayer.getCommandLevel


getEquipment() ​

getEquipment(): ViewableEquipment

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:437

Returns ​

ViewableEquipment

Inherit Doc ​

Implementation of ​

ShownPlayer.getEquipment


getName() ​

getName(): string

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:457

The name other clients see over the player's head and in the player list.

Returns ​

string

Implementation of ​

ShownPlayer.getName


getPosition() ​

getPosition(): Vector3

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:396

Returns ​

Vector3

Inherit Doc ​

Implementation of ​

ShownPlayer.getPosition


getRuntimeId() ​

getRuntimeId(): bigint

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:386

Returns ​

bigint

Inherit Doc ​

Implementation of ​

ShownPlayer.getRuntimeId


getStatusEffects() ​

getStatusEffects(): readonly StatusEffect[]

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:442

Returns ​

readonly StatusEffect[]

Inherit Doc ​

Implementation of ​

ShownPlayer.getStatusEffects


getSyncedProperties() ​

getSyncedProperties(): SyncedProperties

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:427

None, as a player's type declares none.

Returns ​

SyncedProperties

Implementation of ​

ShownPlayer.getSyncedProperties


getType() ​

getType(): string

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:391

Returns ​

string

Inherit Doc ​

Implementation of ​

ShownPlayer.getType


getUUID() ​

getUUID(): UUIDValue

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:452

The identity the client logged in with.

Returns ​

UUIDValue

Implementation of ​

ShownPlayer.getUUID


getVelocity() ​

getVelocity(): Vector3

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:401

A body in no store does not move.

Returns ​

Vector3

Implementation of ​

ShownPlayer.getVelocity


isFlying() ​

isFlying(): boolean

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:492

Returns ​

boolean

Inherit Doc ​

Implementation of ​

ShownPlayer.isFlying


isOnGround() ​

isOnGround(): boolean

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:447

Returns ​

boolean

Inherit Doc ​

Implementation of ​

ShownPlayer.isOnGround


isOp() ​

isOp(): boolean

Defined in: packages/prismarine/src/entity/data/storePlayers.ts:482

Whether the player is an operator, which sets the permissions other clients see.

Returns ​

boolean

Implementation of ​

ShownPlayer.isOp