# S2DPacketOpenWindow

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

### Extends

* [`Packet`](https://scripting.breeze.rip/api/net/minecraft/network/packet)

### 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`](https://scripting.breeze.rip/api/net/minecraft/network/packet).[`getPacketID`](https://scripting.breeze.rip/api/net/minecraft/packet#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
