confirm.yml
The purchase confirmation menu in guis/confirm.yml.
The purchase confirmation menu at guis/confirm.yml. It opens when a player clicks a shop item they
can afford and have not hit the limit on, as long as Shop.Confirm-Purchase is true in
config.yml. Set it to false for one-click purchases.
After editing, run /afkzoneadmin reload.
Title: "Confirm Purchase"Size: 9Preview-Slot: 4
Items: Confirm-Item: Material: LIME_DYE Slots: [0-3] Name: "&a&lConfirm Action" Lore: - "&8Shard Shop" - " " - "&7Buy &f{amount}x {name} &7for" - "&f{price} {currency}&7. Balance: &f{shards}&7." - " " - "&e➥ Click to confirm action!"
Cancel-Item: Material: RED_DYE Slots: [5-8] Name: "&c&lCancel Action" Lore: - "&8Shard Shop" - " " - "&7Cancel this purchase and" - "&7return to the shard shop." - " " - "&e➥ Click to cancel action!"| Key | Default | Description |
|---|---|---|
Title |
&5Confirm Purchase |
Menu title. |
Size |
27 |
Inventory size, a multiple of 9 between 9 and 54. The shipped file uses 9. |
Preview-Slot |
13 |
Slot that shows the item being bought (its own icon). Must be inside Size. |
Items |
- | The buttons and any decoration. Each entry uses Slot: or Slots: and the standard item fields. |
The defaults apply only when a key is missing from the file. Note that a file with Size: 9 and no
Preview-Slot fails to load, because 13 is outside the menu.
Buttons
Section titled “Buttons”Two entry names are buttons:
| Entry | Click does |
|---|---|
Confirm-Item |
Buys the item, then reopens the shop. |
Cancel-Item |
Plays the CLICK sound and reopens the shop. |
Every other entry is decoration (for example a Filler-Item). Only the first button click counts,
so a purchase cannot run twice. Closing the menu with Escape just closes it.
Tokens
Section titled “Tokens”Every item in this menu renders with:
| Token | Value |
|---|---|
{name} / {item} |
The item’s name. |
{amount} |
The item’s Amount. |
{price} |
The price, formatted. |
{currency} |
The currency name matching the price. |
{shards} |
The player’s balance. |
{player} |
The player’s name. |
The purchase itself is checked again on confirm (stock, permission, limit and balance), so a stale confirm menu cannot buy something the player is no longer allowed to.
