Edit the cosmetics catalogue
Add, change, hide or remove cosmetics in the YAML files: one file per type, the fields every entry shares, colours, and what happens when an entry is wrong.
Every tag, colour, font and modifier a player can wear is one entry in a YAML file. You edit the file, run /cca reload, and the menu shows the change without a restart.
Before you start#
You need to be able to edit files in plugins/ExyliaChatCosmetics/. The files you edit live in your language's folder, lang/<language>/cosmetics/ (for example lang/en/cosmetics/tags.yml), because the names and descriptions are text players read. Which language is yours is the language key of the plugin's config.yml, see Languages.
Add or change a cosmetic#
Open the file of its type
Pick it from the table below. A tag goes in lang/<language>/cosmetics/tags.yml.
Copy an entry
Copy an existing entry under the type's section (tags: for tags), give it a new id, and change name, category and what it draws.
Reload
Run /cca reload. Players stay online and keep what they wear.
Find it
Run /cc tags (or the menu of that type). Your entry is under its tab.
tags:
mvp:
category: premium
name: '{primary}&lMVP'
icon: GOLD_INGOT
description: 'Reserved for the {highlight}top players.'
priority: 1One file per type#
| Type | File | Section | Worn |
|---|---|---|---|
| Tag | tags.yml | tags | one |
| Nick colour | nick-colors.yml | nick_colors | one |
| Rank colour | rank-colors.yml | rank_colors | one |
| Chat colour | chat-colors.yml | chat_colors | one |
| Shadow colour | shadow-colors.yml | shadow_colors | one |
| Font | fonts.yml | fonts | one |
| Modifier | modifiers.yml | modifiers | several at once |
animations.yml sits in the same folder but is not a type: it is the library of movement any entry can name with animation:, see Animations. The four custom types have no file, players write them for themselves, see Custom cosmetics. Presets have their own file, presets.yml.
Check that it works#
- The cosmetic is under its tab in the menu.
- The console, after
/cca reload, shows no line naming your file. A problem is one line with the file, the entry and the field. /cca give <player> tag:mvpgives it to a test player (the form is alwaystype:id).
Going further#
Tabs#
Every file starts with a categories section. Each entry is one tab of the menu, and priority is the order, lowest first. Delete a tab and the menu redraws around the rest.
categories:
premium:
name: '{primary}&lPREMIUM'
icon: NETHER_STAR
priority: 7An entry that names a tab nobody declared still loads and a command can still grant it, but no tab lists it, and the console says so.
Hide a cosmetic#
Set hidden: true. It leaves the menu, but a grant still equips it. Use it for rewards you only hand out with /cca give.
Make it paid for, or free#
By default a player owns an entry when they have the permission exyliachatcosmetics.<type>.<id>, or a grant. Set permission: false and only grants own it. Rank colours are the exception: their default is permission: true too, and what makes one free is permission: false with no groups, see Colours. Owning, expiry and permission nodes are in Entitlements.
Write colours#
Wherever a colour is written (color:, a stop inside gradient:), any of these works:
| Written | Means |
|---|---|
#8a51c4, a51c4, 8a51c4 | one colour |
gold, dark_aqua | one of the sixteen named colours |
{primary}, {accent}, {highlight} | a palette token that follows your colours |
#a:#b, #a:#b:#c | a gradient through two or more colours |
A palette token follows your server: change the palette, reload, and every cosmetic written with it changes. A hash needs exactly six digits. shadow-colors.yml also takes #rrggbbaa, auto and none, see Colours.
When an entry is wrong#
Nothing is thrown. The entry is skipped and the console reports the file, the entry and the field, so one typo never costs the other entries:
cosmetics/tags.yml tags.mvp.display: is missing, so there is nothing to drawIf a cosmetic you just wrote is missing from the menu, the reason is one line in the console after /cca reload.
Fields every entry shares
| Key | Default | Means |
|---|---|---|
category | other | the tab it lives in |
name | the id | what the menu calls it |
icon | NAME_TAG | the item drawn in the menu; material: is accepted for it |
description | none | one line or a list; lore: is accepted for it |
priority | 999 | order inside the tab, lowest first; ties break on the id |
permission | true | whether exyliachatcosmetics.<type>.<id> owns it |
requirement | none | read, but nothing evaluates it: do not rely on it |
hidden | false | keeps it out of the menu; a grant still equips it |
metadata | none | free key: value pairs another plugin can read |
name and description take palette tokens, & codes and MiniMessage. On top of these each type adds its own keys: display and head for a tag, color or gradient for a colour, alphabet for a font, decoration for a modifier.
An id is trimmed, lower-cased, spaces become underscores and anything outside a-z, 0-9, _ and - is dropped, so MVP and mvp are the same. The id none is reserved. In commands, grants and placeholders a cosmetic is always type:id, such as tag:mvp.
| Problem | What happens |
|---|---|
| A field the entry cannot do without is missing | that entry is skipped, the rest loads |
| The entry is not a section, or its id is empty | the same |
| It names an undeclared category | loaded, but no tab lists it |
categories is missing | the file loads with no tabs |
| The entries section is missing | the server has none of that type |
A type's catalogue is replaced whole on reload, so a menu never shows half a file.
Something missing on this page? Tell us on Discord