Unlocking cosmetics
A player can use a cosmetic when any of these is true:
- It has
free: true. - The player has
mccosmetics.cosmetic.<id>,mccosmetics.cosmetic.*, or the cosmetic's ownpermission:. - It was bought, rented or given and has not expired.
- The player has
mccosmetics.admin.bypass(staff).
Selling#
price: 5000
currency: vault # vault | hypercredits (default comes from config.yml)
rental:
price: 800
duration: 7d # s, m, h, d, w
hint: "Also a crate reward" # shown when it cannot be bought
Vault needs an economy plugin. hypercredits uses the credits balance of HyperCredits+ (the plugin named HyperCreditsPlus). A cosmetic priced in a currency whose plugin is missing shows its price but cannot be bought, and the player is told why.
Rentals#
A rental is a time-limited unlock. Expired rentals are removed every rentals.check-interval-seconds (30 by default), the cosmetic is taken off, and the player gets a message. A player cannot rent something they already own, but they can buy it while renting to keep it for good.
Crates, quests and commands#
Run /cosmetics give %player% <id> [duration] from any reward command, or use the API. Giving works for offline players that have joined before.
Equip limits#
The limits: section of config.yml sets how many cosmetics of each category can be worn at once (1 by default). Raise it for a rank with mccosmetics.limit.<category>.<number>, for example mccosmetics.limit.trail.2. A limit of 0 turns a category off. With limits.replace-oldest: true equipping into a full category swaps out the oldest one.
Rarity#
Rarity tiers live in config.yml under rarities: with a name, a MiniMessage color, a menu order and a random-pick weight. Use the tier's id as rarity: in a cosmetic.