Let players make their own cosmetics
Players write their own tag and mix their own chat, nick and rank colours: how they do it, the text rules you control, and how to write one for them.
Four kinds of cosmetic are not in any file: a player writes them. They belong to that player alone, and each costs a token the player holds, see Tokens.
| Kind | What it is | Command |
|---|---|---|
| Custom tag | a tag in front of the name: text, and optionally a colour | /cc customtag create <text> [color] |
| Custom chat colour | the colour of what they write | /cc customcolor create <color> |
| Custom nick colour | the colour of their name | /cc customnick create <color> |
| Custom rank colour | the colour their rank's prefix and suffix are repainted in | /cc customrank create <color> |
Before you start#
- Players need a create token of that kind. Give them one with
/cca tokens giveor let them buy it. - A custom tag shows in chat only if your format has a
{tag}piece, see Formats.
Make one as a player#
Open the browser
Run /cc tags (or /cc and open the chat, name or rank colours). These are the browsers that pair with a custom kind.
Switch to what you made
Click the Cosmetics button at the bottom left of the grid. It swaps the catalogue for the player's own list.
Click Create
While that list is open, the anvil Create button (Make one) appears. It asks for the text, then for the colour, and writes the row. With no create token left, it says so at once and asks nothing.
The same thing in one line: /cc customtag create Dragon #8a51c4.
Check that it works#
Equip it from the same list, then write in chat. Their own tag or colour is drawn. If they own a catalogue tag as well, what they made wins.
Going further#
Set the text rules#
A custom tag has to pass these checks in order, and the first one it fails is what the player is told. No token is taken until all pass. The numbers live in config.yml under custom-tags:
custom-tags:
min-length: 2
max-length: 16
pattern: '[A-Za-z0-9_\-]+'
blacklist:
- admin
- staff
- owner
unique: trueexyliachatcosmetics.customtag.createis needed (everyone has it by default).- The length must sit between
min-lengthandmax-length. - The characters
<,>,{,},&,§,%and\are always refused, whateverpatternallows. patternis a regular expression over the whole text; a pattern that does not compile is ignored.blacklistwords are refused anywhere inside the text, in any case.- With
unique: true, a text somebody already holds is refused.
Give a rank a longer limit with the permission exyliachatcosmetics.customtag.length.<n> (for example .length.24); the highest number a player holds wins.
Limit gradients#
A colour is written in the usual way (#8a51c4, gold, {primary}, or several joined with colons for a gradient), see the catalogue. A gradient may use custom-colors.max-stops colours, 4 by default. Raise it for a rank with exyliachatcosmetics.customcolor.stops.<n>. Typing - at the colour question leaves a tag without a colour.
Edit and delete#
- Editing costs an edit token, a separate balance. The row keeps its id, so a worn tag stays worn and a starred colour stays starred.
- Deleting refunds nothing.
/cc customtag deleteremoves every custom tag the player has;/cc customcolor delete <id>,/cc customnick delete <id>and/cc customrank delete <id>remove one. Each asks forconfirm. A worn one is taken off first.
Write one for a player#
/cca customtag set <player> <text> [color] writes a custom tag for them, free and without the create permission. The text rules above still apply, because they keep slurs out of chat.
| Command | Does |
|---|---|
/cca customtag set <player> <text> [color] | writes one, free, rules enforced |
/cca customtag clear <player> | removes every custom tag they made |
/cca customcolor clear <player> | removes their custom chat colours |
/cca customnick clear <player> | removes their custom nick colours |
/cca customrank clear <player> | removes their custom rank colours |
All of them need exyliachatcosmetics.admin; the clear ones ask for confirm.
Technical details
A custom cosmetic is keyed by its database row: customtag:42 stays customtag:42 while it exists. The owner owns it permanently, nobody else can equip it, and it declares permission: false, so the usual exyliachatcosmetics.<type>.<id> node grants nothing.
What a player made wins in all four places:
| Drawn | First | Then | Then |
|---|---|---|---|
| The tag | custom tag | catalogue tag | nothing |
| The name | custom nick colour | nick colour | the name as it comes |
| The message | custom chat colour | chat colour | the group's defaults.chat-color |
| Rank prefix and suffix | custom rank colour | rank colour | the rank as it wrote itself |
A rank colour never paints the name, only the prefix and suffix.
The forbidden characters are the ones the text module reads as an instruction (a MiniMessage tag, a palette token, a legacy colour code, a placeholder). The check runs before pattern and regardless of it.
Something missing on this page? Tell us on Discord