Setformat

DataLion

Retired Staff
#1
When you enable “Custom ranks” you’ll see that your chat messages and name tags (the text being displayed above your head in the game) will start looking a bit differently. They will at least include your group name (rank) in square brackets. Something like this:

[Guest] madhon

If you enable Factions, you’ll see also the faction name and rank in front of the group name.

Now, since the recent update of the PureChat plugin to version 1.4.0.3 you can completely customize how your chat messages and name tags are formatted.

Thanks to that you no longer need to use those weird group names such as {FACTION_RANK}{FACTION_NAME}][Guest

Read below to learn how to use the new feature properly.

Examine the default format first
Make sure to learn the default format first before changing it to something else. Use can use the following commands to do that:

/getformat Guest will reveal what the current chat format is for the Guest rank
/getnametag Guest will reveal the current name tag format for guests

For example the default chat format for the Guest rank is set as follows:

{fac_name}{fac_rank}&3&l{prefix}&7&l[Guest]&r &7{display_name} &7> {msg}

This means that when a guest writes somthing to chat, it will appear in grey color, preceded by the player’s faction name (if he’s a member of a faction), followed by faction rank, followed by “dark aqua” prefix (see below for details), followed by grey [Guest] >.

Set your own custom format
You can use the following commands to modify the chat and nametag formats for guetsts:

/setformat Guest {fac_name}{fac_rank}&8&l[Guest]&r &8{display_name} &8> {msg}
/setnametag Guest {fac_name}{fac_rank}&8&l[Guest]&r {display_name}

This will disallow guests to use a custom prefix (they will be able to set it but it will not be shown), and change their chat messages and name tags to dark grey color.

You can use the following special tags in the chat and name tag format definitions:

{fac_name} will be replaced by the player’s faction name
{fac_rank} will be replaced by the player’s rank in the faction
{prefix} will be replaced by the player’s prefix (see below)
{suffix} will be replaced by the player’s suffix (see below)
{display_name} will be replaced by the player’s name
{msg} can (and should) be used in chat format where you want the actual chat message to appear

The old tags, such as {FACTION_NAME} or {MESSAGE} will work as well but should not be used any more.

Colors and text formatting
You can use all the Minecraft text formatting character pairs, such s §4 for dark red, §l for bold, or §r for plain text in the chat and name tag format definitions. However, it is safer (and slightly easier to work with) to use the & character in place of the §. PureChat will automatically replace it with § to make it work.

Prefixes and Suffixes
Every player can set his/her prefix and suffix using the /setprefix and /setsuffix command unless you disallow it by removing the pchat.command.setprefix or pchat.command.setsuffix permission.

For example if you type /setprefix Happy youur name tag and chat messages will be prefixed by the “dark aqua” colored word “Happy” when using the default formats.

If you want to remove your prefix or suffix you have to type the command followed by a space.

Important: Only you can change your prefix and suffix, not even an op can do it. So be carefull when allowing everyone to use this and make sure you always reset the color after the {prefix} and {suffix} tags.

Don’t screw it up
This is so important that it deserves its own title…

Make sure to always include the {msg} tag in the chat format definition!
Othwerwise that group/rank will not be able to write anything in chat - their messages will simply not appear.

Be smart
Some players really really overuse this too much. You can then see something like this in the chat and only hardly find the actual chat messages:

MyBestFamilyFatherFeeling bad today [CoOwner] SteveNo777 > Hello

I personally don’t even like the default format and prefer to do it like this to keep the chat easy to read:

/setformat Guest &8{display_name} &8> {msg}
/setformat Member &1{display_name} &8> &7{msg}
/setformat Builder &6{display_name} &8> &f{msg}
/setformat Mod &5{display_name} &8> &f{msg}
/setformat Admin &4{display_name} &8> &f{msg}
/setformat CoOwner &b{display_name} &8> &f{msg}
/setformat Owner &a{display_name} &8> &f{msg}

Take it as an inspiration and define your formatting in a way that will work best for your server.