> ## Documentation Index
> Fetch the complete documentation index at: https://jppmc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Customizing JPPrison GUI Menus in the menus/ Folder

> All JPPrison GUI menus are defined in YAML files inside the menus/ folder. Adjust titles, layouts, item materials, lore, and button actions.

Every menu in JPPrison — from the pickaxe upgrade screen to the pets menu — is defined as a YAML file in `plugins/JPPrison/menus/`. You can fully customize titles, item layouts, button materials, lore, and display text without touching any code.

## Menu File Structure

Each menu file follows a common structure: a `title`, a `rows` count defining the inventory size, and an `items` map where each entry represents one slot in the GUI.

```yaml theme={null}
title: "&6&lPickaxe Upgrades"
rows: 6
items:
  enchant-slot:
    slot: 10
    material: ENCHANTED_BOOK
    name: "&e{enchant_name}"
    lore:
      - "&7Level: &f{level}/{max_level}"
      - "&7Cost: &f{cost} tokens"
      - "&eClick to upgrade!"
```

| Key | Type | Description |
| - | - | - |
| `title` | String | The inventory title shown at the top of the GUI. Supports `&` color codes. |
| `rows` | Integer | Number of rows in the inventory (1–6, each row holds 9 slots). |
| `items.<key>` | Map | A named item entry. The key is an internal reference used within the file. |
| `items.<key>.slot` | Integer | Zero-indexed slot number where the item appears (0–53 for a 6-row inventory). |
| `items.<key>.material` | String | Bukkit Material name for the item's icon. |
| `items.<key>.name` | String | Item display name. Supports `&` color codes and `{placeholders}`. |
| `items.<key>.lore` | List | Lines of item lore. Each entry is one line. Supports color codes and placeholders. |

## Button Actions

Each item entry can include an `actions` list that defines what happens when a player clicks the button. Actions are executed in order.

```yaml theme={null}
items:
  close-button:
    slot: 49
    material: BARRIER
    name: "&cClose"
    lore:
      - "&7Click to close this menu."
    actions:
      - type: CLOSE
  warp-button:
    slot: 20
    material: ENDER_PEARL
    name: "&bWarp to Mine"
    lore:
      - "&7Teleports you to the mine."
    actions:
      - type: COMMAND
        value: "warp mine"
```

| Action type | Description |
| - | - |
| `CLOSE` | Closes the inventory immediately. No additional fields required. |
| `COMMAND` | Runs `value` as a player command (without the leading `/`). |
| `OPEN` | Opens another JPPrison menu. Set `value` to the target menu filename (without `.yml`). |
| `MESSAGE` | Sends `value` as a chat message to the player. Supports color codes. |

## Available Placeholders

Menus support `{variable}` placeholders for dynamic values. The specific variables available depend on which menu you are editing. Common placeholders include:

| Placeholder | Example value | Description |
| - | - | - |
| `{level}` | `42` | Current level of the enchant, pet, or upgrade |
| `{max_level}` | `100` | Maximum possible level |
| `{cost}` | `12,500` | Upgrade cost formatted with separators |
| `{enchant_name}` | `Explosive` | Display name of the enchant |
| `{balance}` | `1,337` | Player's current balance in the relevant economy |
| `{name}` | `Steve` | Player's name |

Check the default menu files for the full list of placeholders supported by each individual menu.

## Color Codes

Use `&` color codes throughout menu files for titles, item names, and lore lines.

| Code | Effect |
| - | - |
| `&a`–`&f`, `&0`–`&9` | Standard colors |
| `&l` | Bold |
| `&o` | Italic |
| `&n` | Underline |
| `&m` | Strikethrough |
| `&k` | Obfuscated (random characters) |
| `&r` | Reset all formatting |

## Applying Changes

After editing any file in `menus/`, save it and run:

```
/jpprison reload
```

Menu changes take effect immediately — the next time any player opens that menu they will see the updated version.

> [!TIP]
>
> Edit `plugins/JPPrison/colors/` to change the pickaxe lore color themes shown in the pickaxe menu. Each file in that folder defines a named color theme players can select.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.