Formats
Change how a chat line looks, add the tag to it, or give a rank its own line with hovers and clicks.
A format is a whole chat line, described by a file. By editing it you choose what comes before the message, what shows on hover, and what a click does. You can give each rank its own.
Before you start#
The built-in chat must be on, see The chat module. Formats live in plugins/ExyliaChatCosmetics/lang/<language>/chat/formats/, for example lang/en/chat/formats/. Two ship: default.yml (the public chat) and msg.yml (private messages).
The plugin replaces default.yml when a new version fixes the line, and keeps your old copy as default.yml.v<number>. Put your changes in a file of your own, as below.
Steps: make your own line#
Copy the default
In lang/en/chat/formats/, copy default.yml to vip.yml.
Choose who gets it
At the top of vip.yml set permission: exyliachatcosmetics.chat.format.vip (leave it out for everybody) and weight: 10. A player who qualifies for several formats gets the heaviest one.
Edit the pieces
Under components: each block is one piece of the line, drawn in order of its priority (lowest first). Change a text, or add a block. To show the tag, add:
tag:
priority: 5
text: '{tag}'Reload
Run /cca chat reload, then give the permission to the rank in your permissions plugin.
The shipped default.yml has no tag piece: it draws the rank ({prefix} ), the name ({nick}{suffix}), an arrow, and the message. The tag only appears when your format has {tag}.
Check that it works#
As a player with the permission, write a message: the line should use your piece layout. Run /cca chat line hello to see your line and, in the console, where each hover and click stops. Remove a piece by setting enabled: false on it.
Add a hover or a click#
Each piece takes hover (one line or a list) and click, which is RUN_COMMAND:/x, SUGGEST_COMMAND:/x, OPEN_URL:https://x or COPY:text. A shift-click puts text in the chat box. The shipped name piece suggests /msg {name} , and the message piece offers a shift-click report that runs /report: your server needs a /report command, or remove it. Tokens work in all of these.
Tokens#
| Token | Draws |
|---|---|
{message} | The styled message |
{name} | The plain name |
{nick} | The name in the nick colour |
{tag} | The equipped tag |
{prefix} / {suffix} | The rank prefix and suffix, in the rank colour |
{channel} | The channel's name |
Private messages use {message}, {sender}, {sender_nick}, {sender_tag}, {receiver}, {receiver_nick} and {receiver_tag}. Any %placeholder% from ExyliaLib or PlaceholderAPI works too. Colours are ExyliaLib palette tokens, see Colours.
Make a line depend on the reader#
Placeholders resolve for the sender. Set per-viewer: true and each reader gets their own render: %player_…% becomes the reader and %target_…% stays the sender. A %rel_…% placeholder does this by itself. It costs one render per reader instead of one per message, so only use it when needed.
Give a channel a fixed format#
Set format: vip on a channel in channels.yml to always use that file, see Channels.
How a format is chosen, and file rules
The channel's own format wins if that file loaded. Otherwise the heaviest format whose permission the sender holds (or that has none). Otherwise default. If default is missing or broken, the console says so and messages are sent bare.
A file with components: at its root is one format named after the file. A file without it is read block by block and each block with components: becomes file.block: that is how msg.yml gives msg.sender and msg.receiver, each with a single line piece. Block formats are only used when a feature asks for them by name.
| Key | Default | Meaning |
|---|---|---|
permission | empty | Who may get this format |
weight | 0 | Heaviest qualifying wins |
per-viewer | false | One render per reader |
components.<name> | One piece. A piece with no text is skipped and reported. The name means nothing to the plugin | |
priority | file order | Where the piece sits; lowest first |
enabled | true | false removes the piece but keeps it written |
text, hover, click, shift-click | What is drawn and what it does |
A click that is not one of the four kinds is reported when the file loads. The blanks a piece is padded with are drawn outside its hover and click, so the gap between two pieces answers to neither. A client that hit-tests a few pixels off (a head glyph, an avatar mod) can answer the neighbouring piece: merge the pieces into one and use shift-click for the second action. /cca chat line shows what each character answers to.
Something missing on this page? Tell us on Discord