The chat module
Run your server chat with ExyliaChatCosmetics, or switch the built-in chat off and keep your own chat plugin.
With the chat module on, ExyliaChatCosmetics is your server chat: channels, formats, private messages, a word filter, mentions, emojis, item renders and an announcer, with tags and coloured names drawn straight into the line. This page shows how to turn it on or off and where each part is configured.
Before you start#
The built-in chat needs Paper. The cosmetics alone also run on Spigot. Folia is supported.
Steps#
Decide who runs the chat
The module is on by default. To keep another chat plugin, open plugins/ExyliaChatCosmetics/config.yml and set modules: chat: false.
Apply it
Run /cca reload. The module starts or stops to match the setting. With it off, the plugin styles the message body and leaves delivery to your chat plugin; put the placeholders in that plugin's format, see Placeholders.
Turn single parts on and off
Run /cca menu, click Settings, then Chat commands or Chat features. Or edit chat/config.yml and run /cca chat reload.
If a chat file cannot be read, the module refuses to start, says so in the console, and the plugin goes back to styling messages only. A broken word list costs you the module, never the cosmetics.
Check that it works#
Write a message in chat. You should see your rank, your name and the message in the shipped line. Then run /cca chat line hello: it sends you your own chat line and prints in the console which parts share a hover and click.
Edit the chat#
Two reloads#
/cca reload re-reads everything and switches the module on or off to match modules.chat. /cca chat reload re-reads only the module's own files and never touches the cosmetics. It also re-registers the chat commands, so a command you switched off in chat/config.yml stops answering without a restart.
The chat line stays in normal letters#
If your server uses ExyliaLib's small capitals, menus and messages are drawn in them, but the chat line is not: the message, tag, name, whispers and the clickable pieces keep the letters they were typed in. A player who types WELCOME reads WELCOME. The announcer is the server speaking, so it keeps small capitals. See Messages.
Files the chat module owns
chat/
config.yml switches: commands, mentions, emojis, renders, links, cross-server
filter/ config.yml, rules.yml, whitelist.yml, leet.yml, punishments.yml
text/ emojis.yml, grammar.yml
lang/<language>/chat/
channels.yml where a message goes
formats/ default.yml and msg.yml ship; any other .yml you add is read too
messages.yml every line the module sends, with its own prefix
announcements.yml the announcer's rotationchannels.yml, formats/, filter/punishments.yml and text/emojis.yml hold words players read, so they exist once per language, in lang/<language>/chat/. The rest is shared by every language.
An older version kept these files loose in chat/ (filter.yml, rules.yml, whitelist.yml, leet.yml, punishments.yml, emojis.yml, grammar.yml). Each is moved into its folder on the first start, with your edits kept.
The pipeline a message walks
Processors run in stage order, then by priority (lower first). One that cancels stops the walk. A processor that throws is skipped, except in GATE and FILTER, where the message is cancelled: a broken emoji list never loses a line, a broken word filter does.
| Stage | Does |
|---|---|
| GATE | Chat muted, channel permission, blank message, cooldown |
| FILTER | Too similar to the last message, flood, caps, ip/url/domain/phone/unicode, word rules |
| TRANSFORM | Grammar, emojis, [item] renders, /command suggestions, links, mentions |
| COSMETICS | Font, modifiers and colour on the text |
| FORMAT | Books filter points, picks the format, builds the line |
| DELIVERY | Fires ChatMessageEvent, mention feedback, starts the cooldown |
Delivery takes the chat event at listener-priority (HIGHEST by default, so other plugins have had their say). It trims the readers to the channel's, minus players who ignore the sender, and sets a renderer. It never cancels a message the pipeline let through, so the server delivers it signed as usual. A message the word filter blocked is still shown to staff with exyliachatcosmetics.chat.staff.filtered, prefixed with filtered-marker. Plugins can add processors, see API.
The module's commands and permissions are on Commands and Permissions.
Something missing on this page? Tell us on Discord