menus
The /gifts menu is guis/gifts-menu.yml. You can retheme it freely - change the title, size,
background and buttons. After editing, run /giftsadmin reload.
Gift positions are not in this file. Each gift carries its own Slot in
gifts.yml, so this file only describes the frame around them.
How the file works
Section titled “How the file works”The root holds Title, Size (a multiple of 9) and an Items section. Inside Items there are two
kinds of entry, told apart by one thing only:
- Fillers - any entry with no
Actionskey. Painted into its slots as background. - Action items - any entry with an
Actionslist. The menu dispatches on the action, not on the entry’s key, so you can rename and move these freely.
An entry with Actions: [] is an action item with nothing to do: it renders but clicking it does
nothing.
Slots use either Slot: (a single number) or Slots: (a list where each entry is a number or an
a-b inclusive range). An entry with neither is skipped.
Title: "Daily Gifts"Size: 36
Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Name: "&r" Slots: [0-3, 5-9, 17-19, 25-35] Barrier-Item: Material: GLASS_PANE Name: "&r" Slots: [24-25]
Refresh: Material: CLOCK Slot: 4 Name: "&e&lGifts Refresh" Glow: false Lore: - "&7Daily gifts refresh every day," - "&7claim them before they reset." - "" - "&6 - &eRefresh: &f{refreshes-in}" Actions: - "[refresh]"Item fields are the standard set: Material, Amount, Base64, Custom-Model-Data, Name,
Lore, Glow, Item-Flags. See icon fields.
Render order
Section titled “Render order”Fillers are painted first, then action items, then gift icons on top. That means a filler covering a gift’s slot is harmless - the gift always wins. It also means a page with fewer gifts than you expected still shows a clean background.
The whole menu re-renders once a second while it is open, so states and countdowns stay current without reopening.
Built-in actions
Section titled “Built-in actions”| Action | Does |
|---|---|
[refresh] |
Marks the item as the live refresh clock. Clicking it does nothing; its purpose is rendering. |
Generic actions
Section titled “Generic actions”Available on any item, run when the click isn’t a built-in action:
[command]/[console]<cmd>- run as console[player]<cmd>- run as the player[message]<text>- send a chat message[close]- close the menu[open-gifts]/[gifts]- reopen the gifts menu
The argument is the text after ]. {player} and, with PlaceholderAPI installed, %...% are
resolved in it.
An item may list several actions; they run in order on click.
Tokens
Section titled “Tokens”Only the [refresh] item is rebuilt with tokens. It gets:
| Token | Value |
|---|---|
{refreshes-in} |
Countdown to the next midnight in Settings.Timezone. |
Every other item in this file is rendered once and cached, so {...} tokens and %...% placeholders
in their names and lore are not replaced. Put dynamic text on the refresh item, or on the gift
icons in gifts.yml, which always get the full token set.
Blocked clicks
Section titled “Blocked clicks”The icons flashed when a click is refused, and the sounds the menu plays, live in config.yml, not in this file.
