[API reference](https://jsprismarine.dev/api/index.md) / [@jsprismarine/prismarine](https://jsprismarine.dev/api/@jsprismarine/prismarine/index.md) / command/host/support

# command/host/support

## Interfaces

### CommandPlayer

Defined in: [packages/prismarine/src/command/host/support.ts:259](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L259)

What a command reads and changes of a player target: its game mode, inventory, experience,
attributes, spawn point and position. What it sends goes through the player's session; see
[resolveTarget](#resolvetarget).

#### Properties

##### attributes

> `readonly` **attributes**: `object`

Defined in: [packages/prismarine/src/command/host/support.ts:266](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L266)

###### getValue()

> **getValue**(`id`): `number`

###### Parameters

###### id

`string`

###### Returns

`number`

##### gamemode

> `readonly` **gamemode**: `number`

Defined in: [packages/prismarine/src/command/host/support.ts:264](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L264)

#### Methods

##### getExperience()

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

Defined in: [packages/prismarine/src/command/host/support.ts:268](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L268)

###### Returns

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

##### getFormattedUsername()

> **getFormattedUsername**(): `string`

Defined in: [packages/prismarine/src/command/host/support.ts:262](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L262)

###### Returns

`string`

##### getInventory()

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

Defined in: [packages/prismarine/src/command/host/support.ts:269](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L269)

###### Returns

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

##### getName()

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

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

###### Returns

`string`

##### getRuntimeId()

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

Defined in: [packages/prismarine/src/command/host/support.ts:260](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L260)

###### Returns

`bigint`

##### getWorld()

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

Defined in: [packages/prismarine/src/command/host/support.ts:263](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L263)

###### Returns

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

##### setAttributeValue()

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

Defined in: [packages/prismarine/src/command/host/support.ts:267](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L267)

###### Parameters

###### name

`string`

###### value

`number`

###### Returns

`boolean`

##### setGamemode()

> **setGamemode**(`mode?`): `Promise`\<`void`\>

Defined in: [packages/prismarine/src/command/host/support.ts:265](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L265)

###### Parameters

###### mode?

`number`

###### Returns

`Promise`\<`void`\>

##### setPlayerPosition()

> **setPlayerPosition**(`move`): `Promise`\<`void`\>

Defined in: [packages/prismarine/src/command/host/support.ts:271](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L271)

###### Parameters

###### move

###### headYaw?

`number`

###### pitch?

`number`

###### position

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

###### type?

[`MoveMode`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/presenter/SessionPresenter/index.md#movemode)

###### yaw?

`number`

###### Returns

`Promise`\<`void`\>

##### setSpawnPoint()

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

Defined in: [packages/prismarine/src/command/host/support.ts:270](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L270)

###### Parameters

###### spawn

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

###### Returns

`void`

##### setWorld()

> **setWorld**(`world`): `void`

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

###### Parameters

###### world

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

###### Returns

`void`

***

### CommandTarget

Defined in: [packages/prismarine/src/command/host/support.ts:282](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L282)

A player target a command changes and then tells: the session and the player behind it.

#### Properties

##### player

> `readonly` **player**: [`CommandPlayer`](#commandplayer)

Defined in: [packages/prismarine/src/command/host/support.ts:284](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L284)

##### session

> `readonly` **session**: [`PlayerSession`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/PlayerSession/classes/PlayerSession.md)

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

***

### ReferencedEntity

Defined in: [packages/prismarine/src/command/host/support.ts:181](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L181)

What [entityRefOf](#entityrefof) reads of an entity.

#### Extended by

- [`PlayerCommandSender`](https://jsprismarine.dev/api/@jsprismarine/prismarine/command/CommandManager/index.md#playercommandsender)

#### Properties

##### pitch

> `readonly` **pitch**: `number`

Defined in: [packages/prismarine/src/command/host/support.ts:188](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L188)

##### yaw

> `readonly` **yaw**: `number`

Defined in: [packages/prismarine/src/command/host/support.ts:187](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L187)

#### Methods

##### getFeetY()

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

Defined in: [packages/prismarine/src/command/host/support.ts:186](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L186)

###### Returns

`number`

##### getName()

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

Defined in: [packages/prismarine/src/command/host/support.ts:184](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L184)

###### Returns

`string`

##### getPosition()

> **getPosition**(): `object`

Defined in: [packages/prismarine/src/command/host/support.ts:185](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L185)

###### Returns

`object`

###### getX()

> **getX**(): `number`

###### Returns

`number`

###### getZ()

> **getZ**(): `number`

###### Returns

`number`

##### getRuntimeId()

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

Defined in: [packages/prismarine/src/command/host/support.ts:182](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L182)

###### Returns

`bigint`

##### getType()

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

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

###### Returns

`string`

##### getWorld()

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

Defined in: [packages/prismarine/src/command/host/support.ts:189](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L189)

###### Returns

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

## Variables

### refuse

> `const` **refuse**: (`message`) => `never`

Defined in: [packages/prismarine/src/command/host/support.ts:62](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L62)

Refuses a command that cannot do what it was asked.

The seam's verbs answer counts and booleans, which say "nothing matched".
Some failures are not that: naming a scoreboard objective nobody created is
a mistake rather than an empty result, and Java reports it by name. This is
how a verb says so.

#### Parameters

##### message

`string`

What went wrong, written for the player who typed the line.

#### Returns

`never`

#### Throws

Always; the caller never returns.

***

### unsupported

> `const` **unsupported**: (`subsystem`) => `never`

Defined in: [packages/prismarine/src/command/host/support.ts:48](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L48)

Refuses a command whose host verb has no subsystem behind it.

Thrown rather than answered falsely. A verb that reported "nothing happened"
would be indistinguishable from a command that ran and found nothing, and
the player would be left retyping a command that can never work.

#### Parameters

##### subsystem

`string`

What the server would need, named so the message is useful.

#### Returns

`never`

#### Throws

Always; the caller never returns.

## Functions

### blockPositionOf()

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

Defined in: [packages/prismarine/src/command/host/support.ts:305](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L305)

A block position, which Java floors rather than rounds so `-0.5` is in block `-1`.

#### Parameters

##### position

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#vector3)

#### Returns

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

***

### carryOut()

> **carryOut**\<`T`\>(`work`, `answer`): `T`

Defined in: [packages/prismarine/src/command/host/support.ts:76](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L76)

Starts work a host verb decided on and hands the promise to the dispatch.

#### Type Parameters

##### T

`T`

#### Parameters

##### work

`Promise`\<`unknown`\>

The delivery. Rejections reach the sender; see
  `deferCommandWork`.

##### answer

`T`

What the verb reports, decided before the work started.

#### Returns

`T`

`answer`, unchanged, so a verb reads as one expression.

#### Throws

When the verb ran outside a
  dispatch, where nothing would await `work`.

***

### commandLevelOf()

> **commandLevelOf**(`server`, `dimension`): [`Level`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/Level/classes/Level.md) \| `undefined`

Defined in: [packages/prismarine/src/command/host/support.ts:145](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L145)

The level a dimension a command carries names, or undefined for the default level, which a
dimension without a level is in.

#### Parameters

##### server

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

##### dimension

`string`

#### Returns

[`Level`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/Level/classes/Level.md) \| `undefined`

***

### dimensionIdOf()

> **dimensionIdOf**(`world`): `string`

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

The dimension a command carries for a world: its Java `dimension_type` id, with the level's
name after LEVEL\_MARK for a level other than the default, so a command run at an
entity there acts on its level (#3024).

#### Parameters

##### world

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

#### Returns

`string`

***

### dimensionInLevel()

> **dimensionInLevel**(`server`, `dimension`, `level`): `string`

Defined in: [packages/prismarine/src/command/host/support.ts:135](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L135)

A dimension a command carries, placed in a level when it names none: a script's bare
`minecraft:overworld` means its own level's.

#### Parameters

##### server

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

##### dimension

`string`

The dimension, which may carry a level already.

##### level

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

The level to place it in; the entry level's dimensions carry no level.

#### Returns

`string`

***

### dimensionInLevelOf()

> **dimensionInLevelOf**(`current`, `named`): `string`

Defined in: [packages/prismarine/src/command/host/support.ts:126](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L126)

The dimension `execute in` moves a source to: the one named, in the level the source is in.

#### Parameters

##### current

`string`

The source's dimension, which may carry a level.

##### named

`string`

The dimension the command names.

#### Returns

`string`

***

### entityRefOf()

> **entityRefOf**(`entity`): [`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)

Defined in: [packages/prismarine/src/command/host/support.ts:199](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L199)

The seven fields a command sees of an entity.

The id is the runtime id as a string, which is unique per world and stable
for as long as the entity lives, so [resolveEntity](#resolveentity) can find the
entity back from a reference a command has been carrying across a fork.

#### Parameters

##### entity

[`ReferencedEntity`](#referencedentity)

#### Returns

[`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)

***

### javaDimensionIdOf()

> **javaDimensionIdOf**(`dimension`): `string`

Defined in: [packages/prismarine/src/command/host/support.ts:116](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L116)

The Java `dimension_type` id a command's dimension argument names: the Bedrock spelling of
a vanilla one is translated, and anything else is taken as it is. A level the dimension
carries stays with it.

#### Parameters

##### dimension

`string`

#### Returns

`string`

***

### loadedDimensions()

> **loadedDimensions**(`level`): readonly `string`[]

Defined in: [packages/prismarine/src/command/host/support.ts:176](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L176)

Every dimension a command in a level may name: the dimension type of each of its stems, whether
or not its world is built yet.

#### Parameters

##### level

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

#### Returns

readonly `string`[]

***

### playerSessionOf()

> **playerSessionOf**(`server`, `ref`): [`PlayerSession`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/PlayerSession/classes/PlayerSession.md) \| `undefined`

Defined in: [packages/prismarine/src/command/host/support.ts:239](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L239)

The session of the player a reference names, found by the runtime id the reference carries in
the world that holds the entity.

This is the one place the command host asks for it.

#### Parameters

##### server

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

##### ref

[`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)

#### Returns

[`PlayerSession`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/PlayerSession/classes/PlayerSession.md) \| `undefined`

The session, or undefined when the reference names anything but a player or the
  player has since left.

***

### playersOf()

> **playersOf**(`server`, `refs`): [`CommandPlayer`](#commandplayer)[]

Defined in: [packages/prismarine/src/command/host/support.ts:309](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L309)

The players a command's target list names, skipping the ones that have left.

#### Parameters

##### server

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

##### refs

readonly [`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)[]

#### Returns

[`CommandPlayer`](#commandplayer)[]

***

### resolveEntity()

> **resolveEntity**(`server`, `ref`): [`StoreActor`](https://jsprismarine.dev/api/@jsprismarine/prismarine/entity/data/storeActors/classes/StoreActor.md) \| `undefined`

Defined in: [packages/prismarine/src/command/host/support.ts:218](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L218)

Finds the entity a reference stands for, a store entity through its actor.

Each loaded world answers by runtime id. A command touches a handful of entities and runs
when a player typed it, so asking every world is the cheaper thing to be correct about than a
server-wide index that every despawn and world change would have to keep.

#### Parameters

##### server

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

##### ref

[`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)

#### Returns

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

The entity, or undefined when it has since despawned.

***

### resolvePlayer()

> **resolvePlayer**(`server`, `ref`): [`CommandPlayer`](#commandplayer) \| `undefined`

Defined in: [packages/prismarine/src/command/host/support.ts:298](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L298)

The same, for a verb that sends nothing of its own: the player behind the session.

#### Parameters

##### server

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

##### ref

[`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)

#### Returns

[`CommandPlayer`](#commandplayer) \| `undefined`

***

### resolveTarget()

> **resolveTarget**(`server`, `ref`): [`CommandTarget`](#commandtarget) \| `undefined`

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

The session a reference names and the player behind it.

#### Parameters

##### server

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

##### ref

[`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)

#### Returns

[`CommandTarget`](#commandtarget) \| `undefined`

The target, or undefined when the reference names anything but a player or the
  player has since left.

***

### sessionsOf()

> **sessionsOf**(`server`, `refs`): [`PlayerSession`](https://jsprismarine.dev/api/@jsprismarine/prismarine/player/PlayerSession/classes/PlayerSession.md)[]

Defined in: [packages/prismarine/src/command/host/support.ts:248](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L248)

The sessions of the players a command's target list names, skipping the ones that have left.
A verb that only sends to its targets reads these.

#### Parameters

##### server

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

##### refs

readonly [`EntityRef`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#entityref)[]

#### Returns

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

***

### splitCommandDimension()

> **splitCommandDimension**(`dimension`): `object`

Defined in: [packages/prismarine/src/command/host/support.ts:91](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L91)

A dimension a command carries, split into the dimension and the level, undefined for the default.

#### Parameters

##### dimension

`string`

#### Returns

`object`

##### dimension

> `readonly` **dimension**: `string`

##### level?

> `readonly` `optional` **level?**: `string`

***

### vectorOf()

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

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

A host position as this server's vector.

#### Parameters

##### position

[`Vector3`](https://jsprismarine.dev/api/@jsprismarine/commands/index.md#vector3)

#### Returns

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

***

### worldOf()

> **worldOf**(`server`, `dimension`): [`World`](https://jsprismarine.dev/api/@jsprismarine/prismarine/world/World/classes/World.md)

Defined in: [packages/prismarine/src/command/host/support.ts:160](https://github.com/JSPrismarine/JSPrismarine/blob/e928b08f56694af6821b757ce6b196faebd3199c/packages/prismarine/src/command/host/support.ts#L160)

The world a dimension a command carries names, started if its level has the stem but nobody
has entered it yet.

#### Parameters

##### server

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

##### dimension

`string`

A Java `dimension_type` id, or the Bedrock spelling of a vanilla one,
  naming its level after `@` when it is not the default one.

#### Returns

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

That level's world of the dimension, which may still be enabling and then has no
  chunks loaded, or the Overworld of the dimension's level, then the entry level's, when no stem
  names the dimension.
