menus
Both menus are files in guis/. You can retheme them freely - titles, sizes, backgrounds, buttons
and the cube items themselves. After editing, run /miraclecubeadmin reload.
| File | Menu |
|---|---|
select-menu.yml |
The reward selection menu. Opens from /miraclecube when nothing is selected. |
board-menu.yml |
The cube board. Opens once a reward is selected. |
How a menu file works
Section titled “How a menu file works”The root holds Title, Size (a multiple of 9), an Items section, and a slot list naming where
the dynamic content goes. 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 the entry’s key, so you can rename and move these freely.
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.
Item fields are the standard set - see display fields.
select-menu.yml
Section titled “select-menu.yml”Title: "Select Miracle Reward"Size: 36Reward-Slots: [11-15, 20-23]
Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Name: "&r" Slots: [0-10, 16-19, 24-35] Barrier-Item: Material: GLASS_PANE Name: "&r" Slots: [22-24]Reward-Slots is filled with the enabled rewards in Order sequence. The list length is the cap -
rewards past it are not rendered, so widen it when you add rewards.
Each icon is the reward’s Display, with the matching
Lore-Addons block appended. Clicking a
selectable reward starts or resumes its board and opens the board menu; clicking a locked one flashes
the Locked temporary icon.
Tokens on Items entries: {stage}, {fragments}.
Tokens on reward icons: {stage}, {required}.
board-menu.yml
Section titled “board-menu.yml”Title: "Miracle Cubes"Size: 54Cube-Slots: [10-16, 19-25, 28-34, 37-43]
Encrypted-Cube: Material: PLAYER_HEAD Base64: "e3RleHR1cmVzOntTS0lOOnt1cmw6..." Name: "&b&lEncrypted Cube" Lore: - "&7Decrypt this miracle cube" - "&7to reveal a hidden reward." - " " - "&3 - &bPrice: &f{price} Fragments" - " " - "&e➥ Click to decrypt!"
Decrypted-Cube: Material: NETHER_STAR Name: "&e&lDecrypted Cube!" Glow: true Lore: - "&7You already claimed this cube."
Items: Filler-Item: Material: BLACK_STAINED_GLASS_PANE Name: "&r" Slots: [0-3, 5-9, 17, 18, 26, 27, 35, 36, 44-53]
Selected-Reward: Material: ENDER_CHEST Slot: 4 Name: "&b&lSelected Reward" Lore: - "&bInformation:" - "&3 - &7Reward: &f{reward}" - "&3 - &7Balance: &b{fragments} &3Fragments" - " " - "&e➥ Click to reselect!" Actions: - "[reselect]"Encrypted-Cube and Decrypted-Cube are root-level items, not entries under Items. Both are
required.
Cube-Slots defines the board. Its length is the board size, and the hidden reward is stored as
an index into this list.
Tokens on Encrypted-Cube, Items entries and the temporary icons: {reward}, {fragments},
{price}. Decrypted-Cube is static.
Built-in actions
Section titled “Built-in actions”| Action | Menu | Does |
|---|---|---|
[reselect] / [select] / [open-select] |
either | Open the reward select menu. |
[open-board] / [board] |
either | Open the board menu. |
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
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.
Clicking cubes
Section titled “Clicking cubes”Clicking a slot in Cube-Slots runs a decrypt. What happens next:
| Outcome | Behaviour |
|---|---|
| Not enough fragments | INSUFFICIENT-FRAGMENTS + deny sound + the Insufficient-Fragments flash. Nothing is charged. |
| Already decrypted | Nothing at all. |
| Wrong cube | Price charged, cube marked opened, spin animation, consolation prize revealed, then the decrypted item. |
| Right cube | Price charged, spin animation, reward revealed, stage up, board wiped, select menu reopens. Further cube clicks are blocked until the reveal ends (DECRYPTION-PENDING + its flash). |
Several wrong-cube animations can run at once. Closing the menu cancels the visuals and settles every pending payout immediately.
Blocked clicks
Section titled “Blocked clicks”The icons flashed on a refused click, and the sounds both menus play, live in config.yml, not in these files.
