Skip to content

config.yml

Global settings. After editing, run /miraclecubeadmin reload.

Settings:
Save-Interval: 60
Key Default Description
Save-Interval 60 Seconds between write-behind flushes of player data to SQLite. A win is always flushed immediately regardless of this.

How fragments are earned. Fragments are the currency spent decrypting cubes.

Fragments:
Chance: 5.0
Min-Amount: 1
Max-Amount: 1
Ignore-Creative: true
Worlds: []
Blocks: []
Events:
Block-Break: true
Block-Place: false
PinnaPrison: false
EdDungeons: false
RivalHarvesterHoe: false
Key Default Description
Chance 5.0 Percent chance per event to award fragments. Rolled first, so a low chance keeps the cost of the listener near zero.
Min-Amount 1 Lower bound of the award. Clamped to at least 1.
Max-Amount 1 Upper bound, inclusive. Clamped to at least Min-Amount. Equal bounds skip the roll.
Ignore-Creative true Skips players in creative mode.
Worlds [] World whitelist, case-insensitive. Empty means every world.
Blocks [] Block whitelist, resolved through XSeries. Empty means every block. An invalid name fails the load.

Each key toggles one fragment source. The toggle is read at fire time, so /miraclecubeadmin reload applies changes without a restart.

Key Default Source
Block-Break true Bukkit BlockBreakEvent, MONITOR priority, cancelled events ignored.
Block-Place false Bukkit BlockPlaceEvent.
PinnaPrison false PinnaPrison’s BlockMineEvent.
EdDungeons false EdDungeons’ EdDungeonsSwingSwordEvent.
RivalHarvesterHoe false RivalHarvesterHoes’ RivalBlockBreakEvent.

The last three are hooked purely by reflection: they register only when their plugin is enabled, and log a severe line if that plugin’s API changed. Turning one on without the plugin installed does nothing.

The price of a decrypt and the reveal animation.

Cube:
Price: 10
Animation:
Cycle-Ticks: 4
Duration-Ticks: 50
Reveal-Ticks: 40
Key Default Description
Price 10 Fragments charged per cube click. 0 makes decrypting free.
Animation.Cycle-Ticks 4 Ticks between icon swaps during the spin. Lower spins faster.
Animation.Duration-Ticks 50 How long the spin runs before the outcome is revealed (50 ticks = 2.5s).
Animation.Reveal-Ticks 40 How long the outcome is held on screen after the spin (40 ticks = 2s). On a win, the select menu reopens when this elapses.

All three are clamped to a minimum of 1. The animation cycles through the Random-Rewards icons, so those are what players see spinning.

The price is charged when the cube is clicked, not when the animation ends. The payout happens at the reveal - and if the menu is closed first, it is settled immediately so nothing is lost.

Lines appended to every reward icon in the select menu, chosen by whether the reward is selectable at the player’s current stage.

Lore-Addons:
Unlocked:
- "&8Miracle Cubes"
- " "
- "&7Track down this hidden reward"
- "&7to complete the current board."
- " "
- "&3 - &bStage: &a{stage}&8/&c{required}"
- " "
- "&e➥ Click to select!"
Locked:
- "&8Miracle Cubes"
- " "
- "&3 - &bStage: &a{stage}&8/&c{required}"
- " "
- "&c&lLOCKED"
- "&4➥ This stage is locked for you!"

Tokens: {stage} (the player’s current stage) and {required} (that reward’s Stage multiple). These append to the reward’s own Display.Lore.

The weighted consolation prizes paid out for decrypting a wrong cube. Their icons are also the pool the spin animation cycles through.

At least one entry is required - an empty section fails the load.

Random-Rewards:
Fragments-Small:
Weight: 40
Display:
Material: PRISMARINE_SHARD
Name: "&b&lx3 &3&lFragments"
Commands:
- "[fragments] 3"
Fragments-Medium:
Weight: 20
Display:
Material: PRISMARINE_CRYSTALS
Name: "&b&l5x &3&lFragments"
Glow: true
Commands:
- "[fragments] 5"
Money-Small:
Weight: 25
Display:
Material: EMERALD
Name: "&a&l$10,000"
Commands:
- "eco give {player} 10000"
Exp-Bottles:
Weight: 15
Display:
Material: EXPERIENCE_BOTTLE
Name: "&e&l16x &6&lXP Bottles"
Glow: true
Commands:
- "give {player} experience_bottle 16"
Key Default Description
Weight 1 Relative weight, clamped to at least 1. The roll is bounded by the sum of every weight, so these are ratios, not percentages.
Display required A standard item definition. Its Name is what {reward} shows in RANDOM-REWARD-WON.
Commands [] Console commands run on the miss. {player} is replaced. [fragments] <n> credits fragments instead.

With the defaults above the weights total 100, so they read as percentages. Any scale works.

Icons that flash for about two seconds in the clicked slot when a click is refused, then restore the real item. While a slot is flashing it is inert, so the deny sound can’t be spammed.

All three are optional - remove one and that refusal just plays the sound and sends its message. Each is a standard item definition.

Temporary-Icons:
Locked:
Material: BARRIER
Name: "&c&lError!"
Lore:
- "&7This reward unlocks every &f{required} &7stages."
Insufficient-Fragments:
Material: BARRIER
Name: "&c&lError!"
Lore:
- "&7You need &f{price} Fragments &7for this."
Decryption-Pending:
Material: BARRIER
Name: "&c&lError!"
Lore:
- "&7Please wait for the current decryption to finish."
Key Menu Flashed when Tokens
Locked select A reward below the player’s stage gate is clicked. {stage}, {required}
Insufficient-Fragments board A cube is clicked without enough fragments. {reward}, {fragments}, {price}
Decryption-Pending board A cube is clicked while a winning reveal is still playing. {reward}, {fragments}, {price}

Named sounds in "NAME;volume;pitch" form. Names are XSound names, stable across Minecraft versions. Set a key to "" to silence it.

Inventories-Sounds:
"MENU-OPEN": "ENTITY_BAT_TAKEOFF;1;0.5"
"REWARD-SELECTED": "ENTITY_PLAYER_LEVELUP;1;1.5"
"CUBE-DECRYPT": "ENTITY_CHICKEN_EGG;1;1"
"ANIMATION-TICK": "UI_BUTTON_CLICK;1;1.5"
"RANDOM-WON": "ENTITY_EXPERIENCE_ORB_PICKUP;1;1.5"
"REWARD-WON": "UI_TOAST_CHALLENGE_COMPLETE;1;1"
"FRAGMENT-FOUND": "ENTITY_EXPERIENCE_ORB_PICKUP;0.6;1.8"
"DENY": "BLOCK_NOTE_BLOCK_PLING;1;0.5"
Key Played when
MENU-OPEN Either menu opens.
REWARD-SELECTED A reward is selected in the select menu.
CUBE-DECRYPT A cube click is accepted and the spin starts.
ANIMATION-TICK Each icon swap during the spin. Fires often - keep the volume low.
RANDOM-WON A consolation prize is revealed.
REWARD-WON The hidden reward is revealed.
FRAGMENT-FOUND Fragments drop from mining.
DENY A click is refused.