# Item stash

Item stash is used to put item rewards inside it. (Or really any supported item by running commands). This place is better than giving item directly into the players inventories, since it can be full quickly. The item stash on the other hand supports pagination and can hold any amount of items. Players can pick up items from here anytime they want.

## Configuration

```yaml
config-version: 0

# Should we send a message to the player when they join the server and have unclaimed items?
notify-on-join: true

# What should be the /stash command? You need to specify at least one.
command-aliases:
  - stash
  - itemstash

# Where should be the stash items in the inventory?
stash-area: [
  0, 1, 2, 3, 4, 5, 6, 7, 8,
  9, 10, 11, 12, 13, 14, 15, 16, 17,
  18, 19, 20, 21, 22, 23, 24, 25, 26,
  27, 28, 29, 30, 31, 32, 33, 34, 35,
  36, 37, 38, 39, 40, 41, 42, 43, 44,
]

menu:
  # Title of the inventory
  title: "{{stash-title}}"
  # Default filler item
  filler:
    enabled: true
    item:
      material: black_stained_glass_pane
      name: " "
      hide-tooltip: true
  # Default gui items
  items:
    prev-page:
      material: arrow
      slot: 48
      name: "{{prev-page}}"
      lore:
        - "{{prev-page-lore}}"
    next-page:
      material: arrow
      name: "{{next-page}}"
      slot: 50
      lore:
        - "{{next-page-lore}}"
    current-page:
      material: paper
      name: "{{current-page}}"
      slot: 49
      lore:
        - "{{current-page-lore}}"
    collect-all:
      material: chest
      name: "{{stash-collect-all}}"
      slot: 45
      lore:
        - "{{stash-collect-all-lore}}"
  # You can add extra GUI items.
  custom-items:
    close:
      material: barrier
      name: "{{close}}"
      slot: 53
      lore:
        - "{{close-lore}}"
      on-click:
        - "[close]"
```

## Commands

| Command                                        | Description                                                                                                                                                                                         |
| ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/stash`                                       | Opens the item stash. This is a player command.                                                                                                                                                     |
| `/stash add <player> <item> [amount] [silent]` | Add some items to the stash. If silent is provided and it is true, there won't be any feedback message. Do note that the amount max value is 64 or whatever the vanilla item maximum stack size is. |
| `/stash clear <player>`                        | Deletes everything from a players stash.                                                                                                                                                            |

## API Usage

You can add items to the stash within your plugin. Just use the following code snippet:

```java
AuroraAPI.getUserManager().getUser(player).getStashData().addItem(itemStack);
```


---

# Agent Instructions: 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://docs.auroramc.gg/aurora/item-stash.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.
