Chat Formatting with Essentials Chat
Last modified on Jun 9, 2022 in plugins
By ApexHosting
Overview
Chat formatting lets you control what the chat looks like when anyone speaks in-game. This is how you typically set group names and generally change the formatting to make players or groups stand out.
Chat formatting in Paper is made up of two parts. There is the users nickname or displayname, and chat messages. EssentialsX in combination with its addon EssentialsX Chat and permissions managers like LuckPerms lets you modify both of these.
To prevent conflict with other plugins, EssentialsX will disable most of it’s chat formatting if you don’t install the [EssentialsChat] component with [Essentials]. You can enable the displayname formatting without EssentialsChat, by editing the config file however.
Where to find the settings
The chat formatting settings can be found in the Essentials config file.
You can reach this file by going to the Config Files tab in your server’s control panel
You can also get to the correct file by doing the following:
- Go to FTP File Access and login using your Control Panel password
- Click on the Plugins folder
- Locate and click on the EssentialsX folder and find config.yml file.
The settings are found towards the bottom of the file.
There are two ways you can define chat formatting, you can either define one style of formatting which applies to all groups, or you can give a special formatting for each group.
Formatting Examples
Below are examples for the format settings as seen in the plugins/essentials/config.yml. Here is the section will need to configure in order to format the chat in game.
# +------------------------------------------------------+ # # | EssentialsChat | # # +------------------------------------------------------+ # # This section requires the EssentialsChat.jar to work. chat: radius: 0 format: '<{DISPLAYNAME}> {MESSAGE}' #format: '&7[{GROUP}]&r {DISPLAYNAME}&7:&r {MESSAGE}' group-formats: # Default: '{WORLDNAME} {DISPLAYNAME}&7:&r {MESSAGE}' # Admins: '{WORLDNAME} &c[{GROUP}]&r {DISPLAYNAME}&7:&c {MESSAGE}'
There are an infinite number of different combinations for these settings depending on your personal preference. We will show some example formatting that you can experiment with to gain a sense of how to configure the chat to your liking.
Setting the default format
The following line is how we set the default chat format for all users and groups.
format: '<{DISPLAYNAME}> {MESSAGE}'
We can see our value after format: encased in quotes ex: “’{WORLDNAME}…'”, please note that any edits will need to be made within these ticks otherwise you could break the chat formatting.
Now in value you can see two basic tags {DISPLAYNAME} and {MESSAGE}. More tags like the group the player is in can be added as well, you can find a listing for additional tags on the Essentials wiki.
Lets clean up the default value by getting rid of left and right angle brackets.
format: '{DISPLAYNAME} {MESSAGE}'
Next we should set a standard to easily distinguish the display name of users, along with any additional tags we may want to add later on. We can do this by creating a simple barrier using a colon ” : ” to divide them.
format: '{DISPLAYNAME}: {MESSAGE}'
Now we should set some coloring to distinguish the separation even further as well as add some aesthetic appeal. You can find a list of all available Colors Codes on the essentials wiki, or by running the command /kit color
while playing on the server.
To add color or other formatting such as bolded text or italics, simply type the code for the formatting before your text. For example, if you wanted to use light blue text before in the chat or in your formatting you would put ‘&9’ before the text. Formatting codes can be stacked so you can use both ‘&9’ and ‘&l’ before your text to make it bold and light blue.
format: '&9{DISPLAYNAME}: &7{MESSAGE}'
That’s it, now save your changes, and restart the server for the changes to take effect.
Setting the format based on group
Aside from setting a default format for all users and groups, we can also set the format for individual groups. The following line shows an example for the Default and Admin groups. The list is case sensitive, and must exactly match the group name returned by your permissions plugin. We recommend using LuckPerms as it is very user friendly and easy to learn. To add a new group simply create a new line within ‘group-formats:’ and list the new group. In our example we are going to add a ‘Streamer’ group.
group-formats: # Default: '{WORLDNAME} {DISPLAYNAME}&7:&r {MESSAGE}' # Admins: '{WORLDNAME} &c[{GROUP}]&r {DISPLAYNAME}&7:&c {MESSAGE}' # Streamer: ''
Next we need to activate them by removing the “#” from the beginning of the line.
group-formats: Default: '{WORLDNAME} {DISPLAYNAME}&7:&r {MESSAGE}' Admins: '{WORLDNAME} &c[{GROUP}]&r {DISPLAYNAME}&7:&c {MESSAGE}' Streamer: ''
Now we can format them similar to how we formated the default chat.
group-formats: Default: '&e{GROUP} &8{DISPLAYNAME}: &7{MESSAGE}' Admins: '&c{GROUP} &8{DISPLAYNAME}: &7{MESSAGE}' Streamer: '&3{GROUP} &8{DISPLAYNAME}: &7{MESSAGE}'
That’s it, now save the changes, and restart the server for the changes to take effect. Please note that if you have a group format in place, it will take priority over the default chat format.
Common Issues
I get the generic chat formatting in-game after configuration
This suggests a syntax error in the format. Review the configuration file and run it through a YAML Parser.
I get an internal error when using color codes in the game
This usually means that the configuration file can’t be read by the plugin anymore. The quickest and easiest way to fix this is to delete the config file and restart the server. A new one will be generated after the server finishes loading.
Adding tags from other plugins like Factions
The plugin in you are wanting to add should provide the tags you need to use when formatting the chat. If you have trouble finding them, contact the plugin’s author or a LiveChat agent for further assistance.
Disclaimer
While we offer plugin installation services, we do not offer services in the configuration of plugins. For this you will need to review the Essentials Wiki.