Skip to content

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.

  • 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.

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, a Pool, a Place-Item, and a Gui with an Open-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.

/cosmeticsadmin reload
/cosmeticsadmin place secret

This puts the case’s Place-Item in your inventory. It does not place a block yet - it gives you the item to place.

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.

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.

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-one

The 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.

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.