Skip to content

cases.yml

Each case is one file cases/<id>.yml; the file name (lowercased) is the case id used by /cosmeticsadmin place <id>. One example ships: cases/secret.yml. For the end-to-end setup and how to place a case in the world, see the Cases guide. After editing, run /cosmeticsadmin reload.

Settings, Animation, Place-Item and Gui (with a Gui.Open-Item) are required - omitting any of them stops the case from loading.

Settings:
Display-Name: "&fSecret Crate"
Currency: "Vault"
Price: 1000
Show-Count: 27
Reshuffle: true
Animation:
Reward-Format-Line: "&d&l{cosmetic-name} &7({cosmetic-type})"
Primary-Colour: "#1ff22a"
Secondary-Colour: "#1a8a20"
Head:
Material: PLAYER_HEAD
Base64: "eyJ0ZXh0dXJlcyI6..."
Pool:
- "all"
Key Default Description
Display-Name case id Name shown in messages and holograms ({case}).
Currency Vault Economy for this case: Vault, PlayerPoints or RivalCredits.
Price 1000 Cost per open, in that currency. Withdrawn before the animation plays.
Show-Count 10 How many cosmetics are shown/rotated (minimum 1, capped at the pool size).
Reshuffle true true reshuffles the shown set once per day (at UTC midnight); false keeps a fixed set in pool order.

The reveal spin. Reward-Format-Line is the floating label at reveal (tokens {cosmetic-name}, {cosmetic-type}, {cosmetic-rarity}). Primary-Colour and Secondary-Colour are the hex particle colors during the spin (with or without a leading #) - these are not the rarity {primary} / {secondary}. Head is an optional item definition for the spinning item; if omitted, the Place-Item is used.

The list of cosmetics the case can award. Each entry is one of:

  • all - every enabled cosmetic
  • type:<name> - every enabled cosmetic of a type (e.g. type:tags, type:chat-colors)
  • a cosmetic id - a single cosmetic

Entries are combined and de-duplicated. There is no rarity weighting - every shown, available cosmetic is equally likely. An empty or unresolvable pool makes opening report CASE-EMPTY.

Reward-Name: "{cosmetic}"
Reward-Lore:
- "&7This cosmetic is available within"
- "&7cosmetic cases all year round."
- ""
- "{primary}Information:"
- "{secondary} - &7Type: &f{type}"
- "{secondary} - &7Rarity: &f{rarity}"

Reward-Name and Reward-Lore style the cosmetics shown in the case menu. Tokens: {cosmetic} (name), {type}, {rarity}, {primary}, {secondary}. Limited cosmetics use Limited-Lore instead (below).

Limited maps cosmetic ids to a maximum number of winners. A limited cosmetic can only be won by that many players, each taking an ordered position (1st, 2nd, …); once full it can no longer be won. Winners are stored permanently.

Limited:
midas_gold: 3
eclipse: 1
Limited-Lore:
- "&7This cosmetic is a limited edition."
- ""
- "{primary}Information:"
- "{secondary} - &7Winners: &f{won}/{max}"
- ""
- "{primary}Winners:"
- "{winners}"
Winner-Line:
Won: "{secondary} - &7{position}: &f{player}"
Unclaimed: "{secondary} - &7{position}: &fNone"

Limited-Lore tokens add {won} (winners so far), {max} (winner slots), and {winners} - a line that expands to one Winner-Line per position. Winner-Line.Won / Unclaimed use {position} (an ordinal like 1st) and {player}.

The physical item/block players place to create the case in the world (given by /cosmeticsadmin place <id>). A standard item definition.

Place-Item:
Material: CHEST
Name: "&a&lSecret Case"
Lore:
- "&7Place this block to instantly"
- "&7register it as a case block."
Item-Flags:
- HIDE_ATTRIBUTES

Optional floating text above the placed block. Requires DecentHolograms; without it, the case still works and only the hologram is skipped. Omit the section or set Enabled: false to disable.

Hologram:
Enabled: true
Height: 3.4
Update-Interval: 20
Lines:
- "&a&lSecret Crate"
- "&aCost: &f{price}"
- "&aReshuffle: &f{reshuffle}"
- ""
- "{item}"
Key Default Description
Enabled true Master toggle.
Height 2.5 Height above the block, in blocks.
Update-Interval 20 Ticks between refreshes; also cycles the {item} line.
Lines - Text lines. Tokens: {case}, {item} (cycles the rotation cosmetics), {count}, {price}, {reshuffle}.

The case-opening menu (opened by right-clicking the block). Cosmetic-Slots is where the rotation cosmetics are drawn; Open-Item (required) is the button that starts an open. Any key beginning with Filler-Item is decoration. Slots accept numbers or a-b ranges. Open-Item’s Name / Lore support {price} and {reshuffle}.

Gui:
Title: "&8Secret Case"
Size: 36
Cosmetic-Slots: [0-26]
Filler-Item:
Material: GLASS_PANE
Name: "&r"
Slots: [0-26]
Open-Item:
Material: LIME_STAINED_GLASS_PANE
Slots: [27-35]
Name: "&a&lOpen Case"
Lore:
- "&2 - &7Price: &f{price}"
- "&2 - &7Reshuffle: &f{reshuffle}"
- ""
- "&e➥ Click to open!"

Clicking Open-Item first shows the shared case-confirm menu; the price is only charged after the player confirms.