lootboxes
The lootboxes folder - the lootbox item, its reward and jackpot pools and how many rewards it gives.
Every lootbox is one file in lootboxes/. The file name is the lootbox’s id, used in
/cratesadmin lootbox <player> <lootbox>. After editing, run /cratesadmin reload. How lootboxes
are opened is explained in the Lootboxes guide.
Four files ship, one per animation: example.yml (orbit), example-helix.yml,
example-wheel.yml and example-burst.yml. They share the same vanilla reward pools.
Settings
Section titled “Settings”Settings: Display-Name: "&d&lExample Lootbox" Animation: "orbit" Rewards-Amount: 4| Key | Description |
|---|---|
Display-Name |
The lootbox’s name, shown as {lootbox} in its item, messages and the show. Required. |
Animation |
The file in lootbox-animations/ (without .yml) that plays when it is opened. Required. |
Rewards-Amount |
How many rewards from Rewards one lootbox gives, on top of the jackpot. From 1 up to the number of rewards in Rewards, since no reward repeats in one lootbox. |
The item players hold and place.
Item: Material: PLAYER_HEAD Base64: "eyJ0ZXh0dXJlcyI6..." Name: "{lootbox}" Lore: - "&7Place it on the ground to open it," - "&7its rewards orbit it on a tilted ring." - "" - "&dInformation:" - "&5 - &7Rewards: &f{amount}" - "&5 - &7Jackpots: &f1" - "" - "&dJackpot Pool:" - "{jackpot-items}" - "" - "&dReward Pool:" - "{exclusive-items}" - "" - "&e➥ Place to open!"
Lore-Line: "&5 - &f{reward} &7({chance}%)"The Material must be a block, or the lootbox could never be placed and fails to load. The
shipped ones are textured player heads (Base64). Every other item field works as in a crate’s
Display-Item.
| Token | Value |
|---|---|
{lootbox} |
Settings.Display-Name. |
{amount} |
Rewards-Amount. |
{total} |
Rewards-Amount + 1 (the jackpot included). |
{exclusive-items} |
One Lore-Line per reward in Rewards. Put it on a line of its own. |
{jackpot-items} |
One Lore-Line per reward in Jackpot-Rewards. Put it on a line of its own. |
Lore-Line is required and takes {reward} (the reward’s display name) and {chance} (its
Chance as written).
Rewards and Jackpot-Rewards
Section titled “Rewards and Jackpot-Rewards”Two pools, both required and both non-empty. Rewards-Amount different rewards are drawn from
Rewards, and exactly one from Jackpot-Rewards.
Jackpot-Rewards: "Nether Star": Display-Item: Material: NETHER_STAR Name: "&e&lNether Star &6&l(1x)" Lore: - "&8Legendary Reward" - "" - "&eInformation:" - "&6 - &7Chance: &f{chance}%" Actions: - "[console] minecraft:give {player} nether_star 1" Chance: 40
Rewards: "Diamonds": Display-Item: Material: DIAMOND Name: "&a&lDiamond &2&l(16x)" Lore: - "&8Common Reward" - "" - "&aInformation:" - "&2 - &7Chance: &f{chance}%" Actions: - "[console] minecraft:give {player} diamond 16" Chance: 22Each reward uses the same format as a crate reward (see
crates): a Display-Item (the icon in the show and the name
in the summary), Items, Actions or both, and a Chance.
Chanceis a weight, not a percentage. Each shipped pool adds up to100, so{chance}%reads as a real percentage.- The
Display-Itemname is what{reward}shows in the show labels, the item lore and theLOOTBOX-OPENEDsummary. [broadcast]actions are handy for rare jackpots. The shipped mythical rewards announce themselves with the[Crates]prefix.
Validation
Section titled “Validation”A broken lootbox is skipped and logged with its file name. These fail a lootbox:
- Missing
Settings,Display-Name,Animation,Lore-LineorItem - An
Itemmaterial that is not a block Animationnaming a file inlootbox-animations/that is missing or failed to load- An empty
RewardsorJackpot-Rewards, or a reward that gives nothing Rewards-Amountbelow1or above the number of rewards inRewards
lootboxes/ is only filled with the shipped files when the folder does not exist yet, so a deleted
example stays deleted. Delete the whole folder and restart to get them back.
