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

# ServerboundContainerClickPacket

Clicks a slot of a container.

### Extends

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

### Constructors

#### Constructor

> **new ServerboundContainerClickPacket**(`containerId`, `stateId`, `slot`, `button`, `input`): `ServerboundContainerClickPacket`

A click that reports no changed slots and an empty cursor, so the server may resync the container.

**Parameters**

**containerId**

`number`

The container, 0 for the inventory.

**stateId**

`number`

The container state id.

**slot**

`number`

The slot index.

**button**

`number`

The mouse button, or the hotbar slot for SWAP.

**input**

[`ContainerInput`](/newgen/api/enum_types/containerinput.md)

How the slot is clicked.

**Returns**

`ServerboundContainerClickPacket`

**Overrides**

`Packet.constructor`

### Properties

#### button

> `readonly` **button**: `number`

The mouse button, or the hotbar slot for SWAP.

***

#### containerId

> `readonly` **containerId**: `number`

The container, 0 for the inventory.

***

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

***

#### input

> `readonly` **input**: [`ContainerInput`](/newgen/api/enum_types/containerinput.md)

How the slot was clicked.

***

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

***

#### slot

> `readonly` **slot**: `number`

The slot index.

***

#### stateId

> `readonly` **stateId**: `number`

The container state id the click was made against.
