gifts-menu.yml
The guis/gifts-menu.yml layout - title, size, items, slot syntax, actions and temporary icons.
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.
Default file
Section titled “Default file”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-Item: 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]"
Temporary-Icons: Locked: Material: BARRIER Name: "&c&lError!" Lore: - "&7You cannot claim this gift yet!" Already-Claimed: Material: BARRIER Name: "&c&lError!" Lore: - "&7You already claimed this gift!"Root keys
Section titled “Root keys”| Key | Default | Description |
|---|---|---|
Title |
Daily Gifts |
Inventory title. Supports colors and PlaceholderAPI (resolved once when the menu opens). |
Size |
36 |
Inventory size, a multiple of 9 from 9 to 54. Every gift Slot and every item slot must fit inside it. |
Items |
see above | The background and buttons. |
Temporary-Icons |
see above | Icons flashed on a refused click. See below. |
Every entry under Items is one item, and the entry name is just a label: rename it freely. Each
item is a standard item definition plus:
| Key | Description |
|---|---|
Slot |
A single slot number. |
Slots |
A list where each entry is a number or an inclusive a-b range, for example [0-3, 5-9, 17]. |
Actions |
Optional list of actions run on click. An item without Actions is plain decoration. |
An item with neither Slot nor Slots is not drawn. A slot outside Size stops the load with an
error naming the item.
When two items share a slot, the item with the fewest slots wins it, so a big filler never covers a button. Gift icons are drawn on top of everything, so a filler under a gift’s slot is harmless.
Every item gets the {refreshes-in} token and PlaceholderAPI placeholders, and the whole menu
re-renders once a second while it is open, so countdowns stay current without reopening.
Actions
Section titled “Actions”Each line is [type] argument. An item may list several; they run in order on click. In the
argument, {player}, {uuid}, {refreshes-in} and (with PlaceholderAPI) %...% are resolved.
| Action | Does |
|---|---|
[refresh] |
Nothing on click. Used as a marker on the refresh clock. |
[open-gifts] / [gifts] |
Reopen the gifts menu. |
[command] <cmd> |
Run a command from console. |
[console] <cmd> |
Run a command from console. |
[player] <cmd> |
Run a command as the player. |
[message] <text> |
Send the player a chat message. |
[broadcast] <text> |
Send a message to everyone online. |
[actionbar] <text> |
Show a line above the player’s hotbar. |
[title] title;subtitle;in;stay;out |
Show a screen title. Subtitle and times (in ticks) are optional; times default to 10, 60, 10. |
[sound] NAME;volume;pitch |
Play a sound to the player. |
[close] |
Close the menu. |
[back] |
Go back to the previous menu, if there is one. |
A [title] line with more than five parts, or a time that is not a whole number of zero or more,
fails when the file loads.
Temporary icons
Section titled “Temporary icons”Feedback icons that flash for two seconds in the clicked slot when a click is refused, then the real
gift icon returns. While a slot is flashing, further clicks on it are ignored, so the deny sound and
message can’t be spammed. Each icon is a standard
item definition and gets {refreshes-in} and
PlaceholderAPI placeholders.
| Key | Flashed when |
|---|---|
Locked |
The player clicks a gift whose playtime requirement is not met. |
Already-Claimed |
The player clicks a gift already claimed today. |
Both are optional. Remove one and that click only plays the DENY sound and sends its message.
Deleting the whole Temporary-Icons section brings back the shipped icons, so remove the entries
inside it instead.
The sounds themselves are set in config.yml.
