> For the complete documentation index, see [llms.txt](https://obey.gitbook.io/wiki/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://obey.gitbook.io/wiki/coinflips/features/confirm-gui.md).

# Join Confirmation GUI

Documentation for the Coinflip Join Confirmation GUI feature.

The **Join Confirmation GUI** is a feature designed to prevent players from accidentally joining a coinflip when clicking through the main menu. When enabled, clicking a waiting coinflip will open a secondary verification screen.

***

## Configuration

You can enable or disable this feature in the main `config.yml` under the `coinflip` section:

```yaml
coinflip:
  # ...
  confirm-join: true
```

* `true`: Players must click a green confirm item in the Confirmation GUI to join the game.
* `false`: Clicking a waiting coinflip in the main menu immediately deducts the wager and joins the game.

***

## GUI Customization

The layout, slots, items, and styles for the confirmation GUI are configured in the `confirm.yml` file located in the plugin's `gui/` directory:

```yaml
title: "               %accent%Confirm Join"
size: 27

close-sound: "minecraft:block.chest.close:0.5:0.6"
open-sound: "minecraft:block.chest.open:0.5:0.6"

default-flags:
  - HIDE_ATTRIBUTES
  - HIDE_ENCHANTS

items:
  confirm:
    slot: 11
    material: GREEN_TERRACOTTA
    name: "&aConfirm Join"
    action: "confirm"
    lore:
      - "&8ᴄᴏɪɴꜰʟɪᴘѕ"
      - ""
      - "%accent%Information:"
      - "&fWager against &a%opponent%"
      - "&fWager Amount: &e$%amount%"
      - ""
      - "&#61ff8b➡ Click to Confirm"

  deny:
    slot: 15
    material: RED_TERRACOTTA
    name: "&cDeny/Cancel"
    action: "deny"
    lore:
      - "&8ᴄᴏɪɴꜰʟɪᴘѕ"
      - ""
      - "%accent%Information:"
      - "&fCancel joining and go back."
      - ""
      - "&#ff6161➡ Click to Cancel"
```

### Action Mappings

Both buttons utilize CrownCore's `GuiActionRegistry` system:

* **`confirm`**: The green button is bound to the `confirm` action. Clicking it processes the join request for the wager, deducts the balance, and closes the inventory to start the game.
* **`deny`**: The red button is bound to the `deny` action. Clicking it cancels the pending join request and returns the player back to the main Coinflips GUI.
