blixadocs
/
    UltraCoupons / Configuration

    menus.yml

    Controls the layout and appearance of every UltraCoupons menu - the coupon list, the editor, the item/command reward sub-menus, and the cost confirmation prompt. You can change titles, sizes, item materials, slots, display names, and lore without touching any code.

    # ─────────────────────────────────────────────────────────────────────────────
    # UltraCoupons - menus.yml
    # Layouts for the coupon editor GUIs. Everything visual lives here; the GUI
    # classes only read slots / materials / text out of these sections, so you can
    # re-skin any menu without touching code.
    # ─────────────────────────────────────────────────────────────────────────────
    
    GLOBAL:
      # Shared page-navigation arrows used by every PaginatedMenuManager.
      PAGE-MENU:
        MATERIAL: "ARROW"
        NEXT-BUTTON: "&aNext page"
        BACK-BUTTON: "&aPrevious page"
        NEXT-LORE:
          - "&7Click to go to the next page"
        BACK-LORE:
          - "&7Click to go to the previous page"
    
    # ─── Coupon list menu (/coupon editor) ───────────────────────────────────────
    # Slots 0-44 hold one paper per coupon (45 per page). The bottom row holds the
    # controls. Search / sort / refresh are driven by the PaginatedMenuManager base;
    # EXIT-BUTTON / FIRST-PAGE-BUTTON are the extra buttons CouponListMenu draws.
    COUPON-LIST:
      TITLE: "&8Coupons"
      SIZE: 54
      MAX-ITEMS-PER-PAGE: 45
      PLACEHOLDER: true
      PLACEHOLDER-MATERIAL: "BLACK_STAINED_GLASS_PANE"
      # Previous-page arrow (only shown when a previous page exists).
      BACK-BUTTON:
        SLOT: 47
      # Next-page arrow (only shown when a next page exists).
      NEXT-BUTTON:
        SLOT: 51
      # Slot 45 on page 1: exit. On later pages CouponListMenu swaps in FIRST-PAGE-BUTTON.
      EXIT-BUTTON:
        SLOT: 45
        MATERIAL: "RED_STAINED_GLASS_PANE"
        DISPLAY-NAME: "&cExit"
        LORE:
          - "&7Close the menu"
      FIRST-PAGE-BUTTON:
        MATERIAL: "REDSTONE"
        DISPLAY-NAME: "&eJump to first page"
        LORE:
          - "&7Return to page 1"
      # Admin-only: opens a chat prompt to name and create a new coupon, then its editor.
      ADD-COUPON:
        SLOT: 53
        MATERIAL: "LIME_STAINED_GLASS_PANE"
        DISPLAY-NAME: "&aAdd a coupon"
        LORE:
          - "&7Click to create a new coupon"
      SEARCH-BUTTON:
        SLOT: 48
        MATERIAL: "OAK_SIGN"
        DISPLAY-NAME: "&bSearch"
        LORE:
          - "&7Current filter: &f{query}"
          - "&7Click to type a coupon name"
      REFRESH-BUTTON:
        SLOT: 49
        MATERIAL: "SUNFLOWER"
        DISPLAY-NAME: "&bRefresh"
        LORE:
          - "&7Re-scan coupon definitions"
          - "&7{count} shown"
      SORT-BUTTON:
        SLOT: 50
        MATERIAL: "CAULDRON"
        DISPLAY-NAME: "&bSort: &f{sort_mode}"
        LORE:
          - "&7Left-click to reverse direction"
          - "&7Right-click to switch date/name"
      # Icon used for each coupon entry. {name} / {status} / {cost} / {limit} /
      # {items} / {commands} are substituted per coupon.
      ENTRY:
        MATERIAL: "PAPER"
        DISPLAY-NAME: "&b{name}"
        LORE:
          - "&7Status: {status}"
          - "&7Cost: &f{cost}"
          - "&7Claim limit: &f{limit}"
          - "&7Item rewards: &f{items}"
          - "&7Command rewards: &f{commands}"
          - ""
          - "&eLeft-click to edit"
    
    # ─── Coupon editor (/coupon editor -> pick one) ───────────────────────────────
    # CONTROLS keys must match a Control enum name in CouponEditorMenu. A control with
    # no SLOT is simply not shown, and any slot may be freely moved here without code
    # changes. Placeholders: {name} {status} {enabled} {cost} {limit} {item_status}
    # {command_status} {left_click_status} {description}.
    #
    # Layout (54 slots, clean grid):
    #   row 1:            [8] candle (left-click toggle)
    #   row 2 (editors):  [10] item rewards   [12] command rewards   [14] display text
    #   row 3 (toggles):  [19] item toggle    [21] command toggle    [23] appearance
    #   row 4 (meta):     [28] name  [30] description  [32] display preview  [34] enabled
    #   row 5 (numbers):  [38] cost           [40] claim limit
    #   row 6:            [49] back
    COUPON-EDITOR:
      TITLE: "&8Editing {name}"
      SIZE: 54
      FILLER:
        MATERIAL: "GRAY_STAINED_GLASS_PANE"
      CONTROLS:
        LEFT_CLICK:
          SLOT: 8
          # MATERIAL is chosen in code: GREEN_CANDLE when on, RED_CANDLE when off.
          DISPLAY-NAME: "&bLeft-click redeem: {left_click_status}"
          LORE:
            - "&7Green = left-clicking the voucher redeems it."
            - "&7Red = left-click does nothing (/coupon claim"
            - "&7still works as a fallback)."
            - "&7Click to toggle."
        ITEM_REWARDS:
          SLOT: 10
          MATERIAL: "PAPER"
          DISPLAY-NAME: "&bItem rewards"
          LORE:
            - "&7Click to edit the items given on redeem"
        COMMAND_REWARDS:
          SLOT: 12
          MATERIAL: "COMMAND_BLOCK"
          DISPLAY-NAME: "&bCommand rewards"
          LORE:
            - "&7Click to edit the commands run on redeem"
        DISPLAY_TEXT:
          SLOT: 14
          MATERIAL: "BOOK"
          DISPLAY-NAME: "&bDisplay text"
          LORE:
            - "&7Edit the voucher's shown name/lore"
            - "&7Click to type - use &f|&7 to split lore lines"
        ITEM_REWARDS_ENABLED:
          SLOT: 19
          MATERIAL: "EMERALD"
          DISPLAY-NAME: "&bItem rewards: {item_status}"
          LORE:
            - "&7Click to toggle item rewards"
        COMMAND_REWARDS_ENABLED:
          SLOT: 21
          MATERIAL: "REDSTONE"
          DISPLAY-NAME: "&bCommand rewards: {command_status}"
          LORE:
            - "&7Click to toggle command rewards"
        APPEARANCE:
          SLOT: 23
          MATERIAL: "POPPY"
          DISPLAY-NAME: "&bAppearance"
          LORE:
            - "&7Click while holding an item - or drag"
            - "&7one onto this slot - to make it the"
            - "&7coupon's display item (full NBT)"
        NAME:
          SLOT: 28
          MATERIAL: "NAME_TAG"
          DISPLAY-NAME: "&bInternal name"
          LORE:
            - "&7Current: &f{name}"
            - "&7Click to rename the coupon"
        DESCRIPTION:
          SLOT: 30
          MATERIAL: "WRITABLE_BOOK"
          DISPLAY-NAME: "&bDescription"
          LORE:
            - "&7Current: &f{description}"
            - "&7Click to set the description"
        DISPLAY_PREVIEW:
          SLOT: 32
          MATERIAL: "IRON_DOOR"
        ENABLED:
          SLOT: 34
          MATERIAL: "ENDER_EYE"
          DISPLAY-NAME: "&bEnabled: {enabled}"
          LORE:
            - "&7Overall on/off switch (fully disables"
            - "&7the coupon - click and claim)."
            - "&7Click to toggle"
        COST:
          SLOT: 38
          MATERIAL: "GOLD_INGOT"
          DISPLAY-NAME: "&bCost"
          LORE:
            - "&7Current: &f{cost}"
            - "&7Charged via Vault on redeem (with a"
            - "&7confirmation prompt when above 0)."
            - "&7Click to set"
        CLAIM_LIMIT:
          SLOT: 40
          MATERIAL: "BARRIER"
          DISPLAY-NAME: "&bGlobal claim limit"
          LORE:
            - "&7Current: &f{limit}"
            - "&70 = unlimited"
            - "&7Click to set"
        BACK:
          SLOT: 49
          MATERIAL: "RED_STAINED_GLASS_PANE"
          DISPLAY-NAME: "&cBack"
          LORE:
            - "&7Return to the coupon list"
    
    # ─── Cost confirmation prompt (shown before redeeming a coupon with a cost) ───
    # Placeholders: {name} {cost}. Buttons: CONFIRM / CANCEL / INFO. A button with no
    # SLOT falls back to a sensible centred default.
    CONFIRM-REDEEM:
      TITLE: "&8Confirm redeem: {name}"
      SIZE: 27
      FILLER:
        MATERIAL: "GRAY_STAINED_GLASS_PANE"
      INFO:
        SLOT: 13
        MATERIAL: "PAPER"
        DISPLAY-NAME: "&bRedeem &f{name}&b?"
        LORE:
          - "&7This will cost &e{cost}&7."
          - "&7Confirm to pay and redeem."
      CONFIRM:
        SLOT: 11
        MATERIAL: "LIME_STAINED_GLASS_PANE"
        DISPLAY-NAME: "&aConfirm"
        LORE:
          - "&7Pay &e{cost}&7 and redeem this coupon."
      CANCEL:
        SLOT: 15
        MATERIAL: "RED_STAINED_GLASS_PANE"
        DISPLAY-NAME: "&cCancel"
        LORE:
          - "&7Keep the coupon - nothing is charged."
    
    # ─── Command rewards sub-menu (%coupon% command rewards) ──────────────────────
    # Slots 0-44: one paper per command. Bottom row: add + back + pagination.
    COMMAND-REWARDS:
      TITLE: "&8{name} command rewards"
      SIZE: 54
      MAX-ITEMS-PER-PAGE: 45
      PLACEHOLDER: true
      PLACEHOLDER-MATERIAL: "BLACK_STAINED_GLASS_PANE"
      BACK-PAGE-BUTTON:
        SLOT: 47
      NEXT-PAGE-BUTTON:
        SLOT: 51
      ADD-BUTTON:
        SLOT: 49
        MATERIAL: "COMMAND_BLOCK"
        DISPLAY-NAME: "&aAdd a command reward"
        LORE:
          - "&7Click to type a new command"
          - "&7Use &f%player%&7 for the redeemer"
      BACK-BUTTON:
        SLOT: 45
        MATERIAL: "RED_STAINED_GLASS_PANE"
        DISPLAY-NAME: "&cBack"
        LORE:
          - "&7Return to the coupon editor"
      ENTRY:
        MATERIAL: "PAPER"
        DISPLAY-NAME: "&bCommand #{index}"
        LORE:
          - "&f/{command}"
          - ""
          - "&eLeft-click to edit"
          - "&cRight-click to remove"
    
    # ─── Item rewards sub-menu (%coupon% item rewards) ────────────────────────────
    # Slots 0-44 are a live item grid admins place items into directly. The bottom
    # row holds back + pagination. Contents are saved on close / page change.
    ITEM-REWARDS:
      TITLE: "&8{name} item rewards"
      SIZE: 54
      BACK-PAGE-BUTTON:
        SLOT: 47
      NEXT-PAGE-BUTTON:
        SLOT: 51
      BACK-BUTTON:
        SLOT: 45
        MATERIAL: "RED_STAINED_GLASS_PANE"
        DISPLAY-NAME: "&cBack"
        LORE:
          - "&7Return to the coupon editor"
      INFO:
        SLOT: 49
        MATERIAL: "PAPER"
        DISPLAY-NAME: "&bItem rewards"
        LORE:
          - "&7Place items in the top slots."
          - "&7They are given to the player on redeem."