Installation
Requirements
Section titled βRequirementsβ- Java 21+ - required. The plugin is compiled to Java 21 bytecode; on Java 17 or older it fails
with
UnsupportedClassVersionError. Check withjava -version. - Paper / Folia (or a Paper fork). Spigot is not supported.
api-versionis1.20. - Minecraft 1.20+, tested on 1.21.11. The server must run Java 21.
- An economy for the market and cases - the market and case pricing need a currency provider.
Pick one with
Settings.Economy:Vault(with a Vault economy),PlayerPoints, orRivalCredits. Without one, buying is disabled.
Optional soft dependencies (hooked only if installed):
- PlaceholderAPI - required to expose the cosmetic placeholders an external chat/nametag plugin reads. Cosmetics do not render themselves - see Information.
- Vault / PlayerPoints / RivalCredits - the market/case currency provider.
- DecentHolograms - floating text above placed case blocks. Without it, cases still work; only the holograms are disabled.
- Confirm
java -versionreports 21 or higher. - Stop the server.
- Drop
OptimalCosmetics.jarintoplugins/. - (Recommended) Add
PlaceholderAPI.jar, your economy plugin, and optionallyDecentHolograms.jar. - Start the server. The plugin generates its files and prints a startup banner.
- Run
/plugins-OptimalCosmeticsshould be green.
sqlite-jdbc, XSeries and mysql-connector-java download automatically on first startup via
Paperβs library loader, so the first launch needs internet access and may take a few extra seconds.
Generated files
Section titled βGenerated filesβplugins/OptimalCosmetics/ββ config.yml # global settings, market, economy, rarities, menus themingββ messages.yml # every messageββ locations.yml # placed case blocks (written by the plugin, do not edit by hand)ββ cosmetics/ # one file per type, each holding many cosmeticsβ ββ chat-colors.ymlβ ββ tags.ymlβ ββ name-paints.ymlβ ββ glow.ymlβ ββ tab-icons.ymlβ ββ join-messages.ymlβ ββ leave-messages.ymlββ cases/β ββ secret.yml # example case (crate)ββ guis/β ββ cosmetics-menu.yml # the /cosmetics menuβ ββ equip-menu.yml # equip / unequip / sell confirmationβ ββ cosmetics-market.yml # the /cosmetics market menuβ ββ market-confirm.yml # market purchase confirmationβ ββ case-confirm.yml # case opening confirmationββ data/ ββ data.db # SQLite player data (do not edit by hand)A few example cosmetics ship in each cosmetics/*.yml file so the menu is populated on first run.
Add your own by adding sections to those files - see
Creating Cosmetics.
Storage
Section titled βStorageβPlayer data (owned cosmetics, equipped cosmetics, market listings, case winners) is stored in
SQLite by default at data/data.db. To share data across a network - so equips and ownership
sync between gamemodes - set Settings.Database: "MySQL" and fill in the MySQL section of
config.yml. Both backends use the same schema; SQLite
runs in WAL mode.
Continue to Creating Cosmetics, or read the Information overview first.