Cases
A case is a block players pay to open for a random cosmetic, with a spin animation. Cases are
defined as files and then placed in the world. You need optimalcosmetics.admin.
How a case works
Section titled “How a case works”- Players right-click a placed case block to open the case menu, then confirm to pay the
Price. - Opening plays a ~8-second spin, then awards a random cosmetic from the case’s
Pool. - If the player already owns the winning cosmetic, they get a voucher for it instead.
- Limited cosmetics can only be won by a fixed number of players; once full, they can’t be won.
- Every shown, available cosmetic has an equal chance - there’s no rarity weighting.
1. Define the case
Section titled “1. Define the case”Each case is a file cases/<id>.yml; the file name is the id. One example ships (cases/secret.yml)
- copy it or edit it. At minimum set
Settings(currency, price, rotation),Animation, aPool, aPlace-Item, and aGuiwith anOpen-Item.
Settings: Display-Name: "&fSecret Crate" Currency: "Vault" Price: 1000 Show-Count: 27 Reshuffle: true
Pool: - "all"Every field is documented in the cases.yml reference. Make sure the
Currency you pick has its economy plugin installed, or opening reports the currency is unavailable.
2. Reload
Section titled “2. Reload”/cosmeticsadmin reload3. Get the case block
Section titled “3. Get the case block”/cosmeticsadmin place secretThis puts the case’s Place-Item in your inventory. It does not place a block yet - it gives you
the item to place.
4. Place it in the world
Section titled “4. Place it in the world”Place the block where you want the crate. Placing it registers the location (written to
locations.yml) and, if DecentHolograms is installed, spawns the
hologram above it. Players can now right-click it to open.
5. Removing a case
Section titled “5. Removing a case”Sneak and left-click the case block (as an admin) to remove it. The block is cleared, the hologram removed, the location unregistered, and the case item returned to you. Breaking the block normally is blocked, so cases can’t be griefed.
Limited cosmetics
Section titled “Limited cosmetics”To make a cosmetic exclusive, list it under Limited with the number of winners:
Limited: midas_gold: 3 # only 3 players can ever win this eclipse: 1 # a true one-of-oneThe keys are cosmetic ids, not tiers. Each winner takes an ordered position shown in the case
menu via Limited-Lore and Winner-Line. When a limited cosmetic sells out during an open, the
player is refunded. Full detail: cases.yml → Limited cosmetics.
Reshuffle
Section titled “Reshuffle”With Reshuffle: true the case shows a random subset of Show-Count cosmetics that rerolls daily (at
UTC midnight). With Reshuffle: false the shown set is fixed in pool order and never changes. If the
pool is smaller than Show-Count, the whole pool is shown.