> For the complete documentation index, see [llms.txt](https://scripting.breeze.rip/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scripting.breeze.rip/newgen/api/net/minecraft/network/protocol/game/serverboundplayercommandpacket.md).

# ServerboundPlayerCommandPacket

Sprinting, leaving a bed, elytra and horse jumps.

### Extends

* [`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md)

### Constructors

#### Constructor

> **new ServerboundPlayerCommandPacket**(`action`): `ServerboundPlayerCommandPacket`

A command for the local player.

**Parameters**

**action**

[`PlayerCommand`](/newgen/api/enum_types/playercommand.md)

The command.

**Returns**

`ServerboundPlayerCommandPacket`

**Overrides**

`Packet.constructor`

#### Constructor

> **new ServerboundPlayerCommandPacket**(`action`, `data`): `ServerboundPlayerCommandPacket`

A command with a value for the local player, e.g. a horse jump boost.

**Parameters**

**action**

[`PlayerCommand`](/newgen/api/enum_types/playercommand.md)

The command.

**data**

`number`

The value.

**Returns**

`ServerboundPlayerCommandPacket`

**Overrides**

`Packet.constructor`

### Properties

#### action

> `readonly` **action**: [`PlayerCommand`](/newgen/api/enum_types/playercommand.md)

The command.

***

#### data

> `readonly` **data**: `number`

The extra value, e.g. the jump boost of a horse jump.

***

#### entity

> `readonly` **entity**: [`Entity`](/newgen/api/net/minecraft/world/entity/entity.md)

The entity the command is for, or null when it is not loaded.

***

#### entityId

> `readonly` **entityId**: `number`

The entity the command is for.

***

#### id

> `readonly` **id**: `string`

The protocol id, e.g. "minecraft:swing". Stable across versions, unlike class names.

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`id`](/newgen/api/net/minecraft/network/protocol/packet.md#id)

***

#### name

> `readonly` **name**: `string`

The class name, e.g. "ServerboundSwingPacket".

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`name`](/newgen/api/net/minecraft/network/protocol/packet.md#name)

***

#### serverbound

> `readonly` **serverbound**: `boolean`

True for packets the client sends, false for ones it receives.

**Inherited from**

[`Packet`](/newgen/api/net/minecraft/network/protocol/packet.md).[`serverbound`](/newgen/api/net/minecraft/network/protocol/packet.md#serverbound)
