> For the complete documentation index, see [llms.txt](https://blowsy.gitbook.io/raven-b4/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blowsy.gitbook.io/raven-b4/documentation/inventory.md).

# inventory

### click

```java
inventory.click(int slot, int button, int mode);
```

Clicks a slot in the inventory. <https://wiki.vg/Protocol#Click_Container>

### getBookContents

```java
List<String> pages = inventory.getBookContents();
```

Returns a list of pages in a json format.

### getChest

```java
String chestName = inventory.getChest();
```

Gets the current chest name.

### getChestSize

```java
int chestSize = inventory.getChestSize();
```

Gets the current chest's size.

### getContainer

```java
String container = inventory.getContainer();
```

Gets the current container name.

### getSize

```java
int size = inventory.getSize();
```

Gets the current inventory's size.

### getSlot

```java
int slot = inventory.getSlot();
```

Returns the current slot.

### getStackInChestSlot

```java
ItemStack item = inventory.getStackInChestSlot(int slot);
```

Gets the item in a specified chest slot.

### getStackInSlot

```java
ItemStack item = inventory.getStackInSlot(int slot);
```

Gets the item in a specified slot.

### open

```java
inventory.open();
```

Opens your inventory menu.

### setSlot

```java
inventory.setSlot(int slot);
```

Sets your slot.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://blowsy.gitbook.io/raven-b4/documentation/inventory.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
