# How to create a reward GUI

Creating a rewards gui is simple, just create a new yml file in the `UltraCollections/rewards` folder and use the template provided in this page. With what you've learned from [How the GUI system works](https://github.com/abyssxd/UltraCollections-Wiki/wiki/How-the-GUI-system-works), you know that you need to define a item icon in the stucture for the item to show up. So follow these steps:

***

## Instructions

1. Create yml
2. Fill it with the template
3. We've defined a "I" in the structure, now go in-game and hold your rewards item and run this command: `/collections setreward <reward_file> <reward_name> <item_icon>`

* The `reward_file` is the file you just made WITHOUT THE .YML, so a dirt\_reward.yml would be `dirt_reward`
* The `reward_name` is just a key lets set it to `helmet` for now.
* Now the `item_icon`, as we already have an `I` in the stucture, lets use `I`.
* Here is your final command: `/collections setreward dirt_reward helmet I`

4. Now the item is added to the config file and in the GUI in-game.

***

### Template

```
GUI:
  title: Dirt Level 2 Rewards
  category_name: dirt_level_2
  structure:
    - '# # # # # # # # #'
    - '# # # # # # # # #'
    - '# # # # I # # # #'
    - '# # # # # # # # #'
    - '# # # # # # # # #'
    - '# # # # C # # # #'
  ingredients:
    filler:
      gui_item: BLACK_STAINED_GLASS_PANE
      item_icon: '#'
      item_name: '&f'
      item-lore: []
      custom_model_data: 1069

    close:
      gui_item: BARRIER
      item_name: '&cClose'
      item_icon: C
      item-lore: []
      actions:
        opengui: farming
        play_sound:
          sound: ENTITY_ITEM_PICKUP
          volume: 1.0
          pitch: 1.0

```

***

### Example

```
GUI:
  title: Dirt Level 2 Rewards
  category_name: dirt_level_2
  structure:
    - '# # # # # # # # #'
    - '# # # # # # # # #'
    - '# # H I L B # # #'
    - '# # # # # # # # #'
    - '# # # # # # # # #'
    - '# # # # C # # # #'
  ingredients:
    filler:
      gui_item: BLACK_STAINED_GLASS_PANE
      item_icon: '#'
      item_name: '&f'
      item-lore: []
      custom_model_data: 1069

    close:
      gui_item: BARRIER
      item_name: '&cClose'
      item_icon: C
      item-lore: []
      actions:
        opengui: farming
        play_sound:
          sound: ENTITY_ITEM_PICKUP
          volume: 1.0
          pitch: 1.0

    helmet:
      item_name: Helmet
      item_icon: H
      itemstack:
        ==: org.bukkit.inventory.ItemStack
        v: 2586
        type: LEATHER_HELMET
        meta:
          ==: ItemMeta
          meta-type: COLORABLE_ARMOR
          display-name: '"Dirt Helmet"'

    chestplate:
      item_name: Chestplate
      item_icon: I
      itemstack:
        ==: org.bukkit.inventory.ItemStack
        v: 2586
        type: LEATHER_CHESTPLATE
        meta:
          ==: ItemMeta
          meta-type: COLORABLE_ARMOR
          display-name: '"Dirt Chestplate"'

    leggings:
      item_name: Leggings
      item_icon: L
      itemstack:
        ==: org.bukkit.inventory.ItemStack
        v: 2586
        type: LEATHER_LEGGINGS
        meta:
          ==: ItemMeta
          meta-type: COLORABLE_ARMOR
          display-name: '"Dirt Pants"'
    boots:
      item_name: Boots
      item_icon: B
      itemstack:
        ==: org.bukkit.inventory.ItemStack
        v: 2586
        type: LEATHER_BOOTS
        meta:
          ==: ItemMeta
          meta-type: COLORABLE_ARMOR
          display-name: '"Dirt Boots"'
```


---

# 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.pogmc.net/plugins/ultracollections/how-to-create-a-reward-gui.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.
