> 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/api/net/minecraft/network/server/s2dpacketopenwindow.md).

# S2DPacketOpenWindow

Represents a packet that is sent when opening a new window/GUI

### Extends

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

### Methods

#### getEntityId()

> **getEntityId**(): `number`

Gets the ID of the entity associated with this window, if any

**Returns**

`number`

The entity ID

***

#### getGuiId()

> **getGuiId**(): `string`

Gets the identifier string for the GUI type

**Returns**

`string`

The GUI type ID string

***

#### getPacketID()

> **getPacketID**(): `string`

Get the ID of the packet.

**Returns**

`string`

The ID of the packet.

**Inherited from**

[`Packet`](/api/net/minecraft/network/packet.md).[`getPacketID`](/api/net/minecraft/network/packet.md#getpacketid)

***

#### getSlotCount()

> **getSlotCount**(): `number`

Gets the number of slots in the window

**Returns**

`number`

The slot count

***

#### getWindowId()

> **getWindowId**(): `number`

Gets the ID of the window being opened

**Returns**

`number`

The window ID

***

#### getWindowTitle()

> **getWindowTitle**(): `string`

Gets the title of the window without formatting codes

**Returns**

`string`

The window title text

***

#### hasSlots()

> **hasSlots**(): `boolean`

Checks if this window contains inventory slots

**Returns**

`boolean`

true if the window has slots, false otherwise
