# :icon-book: In-Game GUI System

The plugin provides 7 graphical interfaces for managing advancements in-game.

* * *

#### 

**AdvancementMainGUI**

- **Size:** 54 slots
- **Title:** `"&8Premium Advancements"` (unfiltered) or `"&8Tab: <name>"` (tab-filtered)
- **Access:** `/padv gui`

**Layout:**
- **Slots 10-16, 19-25, 28-34** (21 slots): Advancement items, paginated
- **Slot 45** (feather): Previous page (shown when page > 0)
- **Slot 48** (compass): Tab selector / back to tabs (shown when multiple tabs exist)
- **Slot 49** (emerald block): Create new advancement
- **Slot 53** (feather): Next page (shown when page < max)
- **Other slots:** Gray stained glass pane decoration

**Interactions:**
- **Left-click** on an advancement: Opens the edit GUI
- **Right-click** on an advancement: Opens the delete confirmation GUI

* * *

#### 

**AdvancementCreateGUI**

- **Size:** 54 slots
- **Title:** `"&8Create Advancement"`
- **Access:** Click the emerald block in the main GUI

**Line 1 (Slots 10-13): Basic Info**
- Slot 10: Title (click to type in chat)
- Slot 11: Description (click to type in chat)
- Slot 12: Icon (click to type material name in chat)
- Slot 13: Icon Custom Model Data

**Line 1 (Slots 14-16): Reward Types**
- Slot 14: Item Rewards toggle
- Slot 15: Permission Rewards toggle
- Slot 16: PlayerPoints toggle

**Line 2 (Slot 19): Trigger**
- Click to cycle through trigger types via chat input

**Line 3 (Slots 28-29): Contextual Configuration**
- Depends on the selected trigger type

**Line 4 (Slots 20-25, 30-34): Display & Sound**
- Slot 20: Custom Model Data / contextual field
- Slot 21: Position X
- Slot 22: Position Y
- Slot 23: Frame type (cycles: TASK -> GOAL -> CHALLENGE -> TASK)
- Slot 24: Random Reward Pools
- Slot 25: Discord Webhook toggle
- Slot 30: Toast notification toggle
- Slot 31: Chat announce toggle
- Slot 32: Action bar toggle
- Slot 33: Sound settings
- Slot 34: Broadcast toggle

**Line 5 (Slots 37-39): Rewards**
- Slot 37: Command Rewards toggle
- Slot 38: Reward Commands (click to add, right-click to clear)
- Slot 39: Money Reward

**Line 6 (Slots 40-44): Advanced**
- Slot 40: Dependencies / Requirements
- Slot 41: Hidden toggle (locked until dependencies set)
- Slot 42: World restrictions
- Slot 43: Permission requirement
- Slot 44: Visual connection target

**Bottom:**
- Slot 49: Save / Create (green wool)
- Slot 53: Cancel (red wool)

* * *

#### 

**AdvancementEditGUI**

- **Size:** 54 slots
- **Title:** `"&8Edit: {title}"`
- **Access:** Left-click an advancement in the main GUI

Same layout as the create GUI with these differences:
- Slot 49: Save Changes (green wool)
- Slot 53: Back (barrier)
- Additional edit features: Item rewards, Permission rewards, PlayerPoints, Broadcast, Reward pools

* * *

#### 

**ConfirmDeleteGUI**

- **Size:** 27 slots
- **Title:** `"&cConfirm Delete"`
- **Access:** Right-click an advancement in the main GUI

**Layout:**
- Slot 11: Confirm (red wool)
- Slot 13: Advancement icon with warning lore
- Slot 15: Cancel (gray wool)

* * *

#### 

**Customizing Vanilla Advancement Broadcasts**

When viewing a vanilla tab (e.g. "Minecraft") in the main GUI, each vanilla advancement is displayed with its icon, title, and description. You can customize the chat broadcast message for any vanilla advancement:

- **Left-click** a vanilla advancement → opens chat input. Type your custom broadcast message and press Enter. Supports `%player%`, `%advancement%` (with hover tooltip showing the description), `%description%`, all color formats (`&#RRGGBB`, `<gradient>`, `<rainbow>`, `&` codes), and PlaceholderAPI placeholders. The chat confirmation preview renders the formatted message with colors applied (v2.5+).
- **Right-click** a vanilla advancement → removes the custom message, reverting to the default vanilla broadcast.
- Messages are stored in `vanilla-messages.yml` and take effect immediately — no reload needed.

* * *

#### 

**StatsGUI**

- **Size:** 54 slots
- **Title:** `"&8Stats: {player}"`
- **Access:** `/padv stats [player]`

**Layout:**
- Slot 0: Most recent completion
- Slot 4: Player head with completion count and percentage
- Slots 10-16, 19-25, 28-34: Paginated advancement list
  - Completed: Shows progress bar and completion time
  - In progress: Shows current progress
  - Locked (hidden + not completed): Shows as BARRIER with "???"
  - Not started: Shows as missing or locked

* * *

#### 

**TabSelectorGUI**

- **Size:** 54 slots
- **Title:** `"&8Select Tab"`
- **Access:** Opens automatically when multiple tabs exist and `/padv gui` is used. Also accessible via the compass button (slot 48).

**Layout:**
- Slots 10-16, 19-25, 28-34: Tab icons with name, namespace, advancement count
- Slot 49: Info book explaining how to create/delete tabs (web editor or manual YAML)

**Tab ordering:** Tabs are sorted by their `tabOrder` value (ascending). Custom tabs use the `tabOrder` field in their YAML file or the **Tab Position** field in the web editor. Vanilla tabs use `vanilla-tab-order` in `config.yml`.

* * *

#### 

**TabSettingsGUI**

- **Size:** 27 slots
- **Title:** `"&8Tab Settings: {name}"`
- **Access:** Right-click a tab in the TabSelectorGUI

**Layout:**
- **Slot 11** (comparator): Tab Position / Order -- left-click to change, right-click to reset to default (999)
- **Slot 13** (name tag / paper): Root Icon Custom Model Data -- left-click to change, right-click to clear
- **Slot 15** (tab root icon material): Root Icon info -- display only
- **Slot 22** (barrier): Back to tab selector
- **Slot 26** (green wool): Save & Close

**Saving:**
- Custom tabs: saves to the tab's `.yml` file (`tab.tabOrder`, `root.iconCustomModelData`)
- Vanilla tabs: saves `vanilla-tab-order` to `config.yml`
- Run `/padv reload` to apply changes
