> For the complete documentation index, see [llms.txt](https://ultimaterewards.athelion.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ultimaterewards.athelion.eu/configuration/menus/basics.md).

# Basics

To create your custom reward GUI, you can use the "guis.yml" file. You can modify individual menus at any time, add or remove rewards as needed.

### Click Actions

* `actions`
  * The given actions can be executed at any type of click
* `left-click-actions`
  * The given actions can be executed only when left clicked
* `right-click-actions`
  * The given actions can be executed only when right clicked

{% hint style="info" %}
`action` (singular) can be used as a shorthand when the item only needs a single click action.
{% endhint %}

You can also link and manipulate GUIs to specify which one should be opened using click actions. Currently available click actions are:

| Click action                  | What it does                                                         |
| ----------------------------- | -------------------------------------------------------------------- |
| `[OPEN] <menu>`               | Opens the specified menu                                             |
| `[CLOSE]`                     | Closes the currently opened menu                                     |
| `[MESSAGE] <text>`            | Closes the menu and sends the text to the player (`\|` splits lines) |
| `[CONSOLE] <command>`         | Dispatches the command through the console                           |
| `[PLAYER] <command>`          | Dispatches the command as the player                                 |
| `[SOUND] <sound>`             | Plays a sound, e.g. `BLOCK_NOTE_BLOCK_PLING,volume:0.1,pitch:1`      |
| `[APPLY]`                     | Opens the input menu for applying a referral                         |
| `[CREATE_REFERRAL]`           | Creates a referral for the player                                    |
| `[TOGGLE_JOIN_NOTIFICATION]`  | Toggles the join notification for the player                         |
| `[TOGGLE_LIVE_NOTIFICATIONS]` | Toggles live notifications for the player                            |
| `[TOGGLE_JOIN_AUTO_CLAIM]`    | Toggles join auto-claim for the player                               |
| `[TOGGLE_LIVE_AUTO_CLAIM]`    | Toggles live auto-claim for the player                               |

{% hint style="info" %}
The four toggle actions are described on the [Reward Settings](/configuration/rewards/reward-settings.md) page — each of them requires its own permission.

Text input for `[APPLY]` is taken either from an anvil GUI or from chat, depending on `input-type` in [config.yml](/usage/global-configuration.md).
{% endhint %}

### Menu Creation

Every menu has a required configuration consisting of '`title`', '`rows`', and '`content`'.

{% hint style="warning" %}
Make sure you use the item names appropriate for the version, if you use the wrong item name then the item will default to STONE
{% endhint %}

#### Menu keys

| Key              | Description                                                            |
| ---------------- | ---------------------------------------------------------------------- |
| `title`          | Title of the inventory                                                 |
| `rows`           | Number of rows                                                         |
| `content`        | Items and rewards by slot number                                       |
| `inventory-type` | `CHEST` (default), `WORKBENCH`, `HOPPER`, `DISPENSER`, `BREWING`       |
| `filler`         | Item used to fill empty slots; use `none` or `air` to leave them empty |
| `sound`          | Sound played when the menu is opened                                   |
| `command`        | Registers a command that opens this menu                               |

#### Item keys

| Key                                                                 | Description                                                              |
| ------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| `item`                                                              | Material, base64 head texture or a [custom model](/colors-and-models.md) |
| `name`                                                              | Display name                                                             |
| `lore`                                                              | List of lore lines                                                       |
| `glowing`                                                           | `true` adds the enchantment glow                                         |
| `action` / `actions` / `left-click-actions` / `right-click-actions` | Click actions, see above                                                 |

Here's an example of how you might set up a menu with these configurations:

```yaml
main:
  title: "Main Rewards Menu"
  rows: 5
  filler: GRAY_STAINED_GLASS_PANE
  inventory-type: CHEST # Available Types: CHEST, WORKBENCH, HOPPER, DISPENSER, BREWING
  content:
    13:
      item: CHEST
      name: "&aDaily Rewards"
      glowing: true
      lore:
        - '&7Menu with daily rewards'
        - ''
        - '&b► Click to open'
      action: '[open] dailyRewards'
    40:
      item: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjZkOGVmZjRjNjczZTA2MzY5MDdlYTVjMGI1ZmY0ZjY0ZGMzNWM2YWFkOWI3OTdmMWRmNjYzMzUxYjRjMDgxNCJ9fX0=
      name: "&cClose"
      lore:
        - '&7Closes menu'
      actions: # Example of multiple click actions
        - "[close]"
        - "[message] You have closed the menu"
```

{% hint style="info" %}
As you may have noticed, a textured skull (base64) was used in this example. In addition, models from Oraxen, ItemsAdder plugin or your own custom model can also be used. More about this [here](/colors-and-models.md).
{% endhint %}

This example will create an inventory with 5 rows (45 slots), set its title to 'Main Rewards Menu', and then set content with the following positions:\
\
At position 13 in the inventory, a CHEST item is set with the specified parameters ('`name`', '`lore`', and '`left-click-actions`' & '`right-click-actions`' or '`actions`' for both click actions). The 'action' parameter specifies what will happen when the player clicks on this item in the inventory. In this case, it will open the example menu '**dailyRewards**'.

### Placing rewards in a menu

A slot can also hold a reward instead of a decorative item — write the reward's file name as the value of the slot. Rewards that consist of several steps (advent calendar, streak rewards, pickable rewards…) are referenced as `<reward>:<step>`.

```yaml
dailyRewards:
  command: "daily"
  title: "Daily Rewards Menu"
  rows: 4
  sound: BLOCK_NOTE_BLOCK_PLING
  content:
    13: exampleTimeReward       # a whole reward
    14: exampleStreakReward:3   # the third step of a streak reward
    31:
      item: eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNjZkOGVmZjRjNjczZTA2MzY5MDdlYTVjMGI1ZmY0ZjY0ZGMzNWM2YWFkOWI3OTdmMWRmNjYzMzUxYjRjMDgxNCJ9fX0=
      name: "&cBack"
      lore:
        - "&7Return to the main menu"
      action: '[open] main'
```

Each menu can be assigned with the `command` key a command that opens this menu. More complete examples are on the [Example of GUIs](/configuration/menus/example-of-guis.md) page.
