> 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/serverboundplayeractionpacket.md).

# ServerboundPlayerActionPacket

Mining, dropping items, releasing a bow, swapping hands.

### Extends

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

### Constructors

#### Constructor

> **new ServerboundPlayerActionPacket**(`action`, `pos`, `direction`): `ServerboundPlayerActionPacket`

An action. Use BlockPos(0, 0, 0) and DOWN for actions without a block.

**Parameters**

**action**

[`PlayerAction`](/newgen/api/enum_types/playeraction.md)

The action.

**pos**

[`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The block.

**direction**

[`Direction`](/newgen/api/enum_types/direction.md)

The face.

**Returns**

`ServerboundPlayerActionPacket`

**Overrides**

`Packet.constructor`

### Properties

#### action

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

The action.

***

#### direction

> `readonly` **direction**: [`Direction`](/newgen/api/enum_types/direction.md)

The face, for mining actions.

***

#### 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)

***

#### pos

> `readonly` **pos**: [`BlockPos`](/newgen/api/net/minecraft/core/blockpos.md)

The block, for mining actions.

***

#### sequence

> `readonly` **sequence**: `number`

The block-prediction sequence number.

***

#### 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)
