How do I add names before/after other player's names when they talk? (Prefixes/suffixes) [closed]
I'll give you an example, we've got a guy named Jess. When he talks in chat it should show something like:
"[somePrefix] <Jess> [someSuffix]: [Jess's message]"
Vanilla
This method requires NBTExplorer.
- Add a team to the scoreboard and join the team in-game.
- Leave the game and open NBTExplorer. Navigate to:
saves/[world name]/data/scoreboard.dat [n entries]/data: n entries/Teams: n entries
, wheren
is (obviously) the number of entries. - Expand all sub-directories and locate the one with the
Name
value set to the name of the team you joined. - Modify the
Prefix
andSuffix
values to your liking using color codes (e.g. modifyPrefix
to§9Member §r
for a blue Member prefix) and save the edits.
Modified servers
There are many ways to set user prefixes and suffixes with the help of external plugins in modified servers (CrafrBukkit, Spigot, Paper, etc.), some of which have been mentioned in alzeinfoaud’s answer already.
GroupManager/PermissionsEx/similar plugins
- Create a group and join the group. (e.g. in PEx:
pex group member create
thenpex user Steve group add member
) - Modify the prefix and suffix to your liking. (e.g. in PEx:
pex group member prefix “&9Member &r” in-game, or modify
groups/member/options/prefixvalue in
permissions.yml`)
EssentialsChat
- Head to
config.yml
and scroll tochat/group-formats
under theEssentialsChat
section. - Add a new item to the list. Note that the name of the value must be identical to the group name in your permissions plugin. (e.g. there is a
member
group in your permissions configuration, so addmember: [chat format here]
to the list.) - Modify the prefix and suffix for each group to your liking.
DeluxeChat
- Head to
config.yml
and scroll to the bottom. - Add a new section to the file. Modify the values.
- Add the corresponding permission node
chatformat.[section name]
to the user group.
For detailed information on DeluxeChat configuration, head to its plugin page.
iChat
- Head to
groups.yml
. - Add a new entry to the file. Modify the
format
value. - Add the corresponding permission mode
ichat.[group name]
to the user group.
For detailed information on iChat configuration, head to its plugin page.
Note
For all of the methods above, changes will only take place upon saving the file and reloading the plugin. Slightly off-topic, but using /reload
is discouraged as it may break some plugins installed. It is better to use a plugin manager like PlugMan to reload plugins individually or initiate a server reboot.