Minecraft – How to make nicknames using command blocks

minecraft-java-edition

I'm making a server and an adventure map and I wanted to create a class system with command blocks that shows a nickname like "warrior", "archer", and stuff like that, but I don't know how. I know this is possible because Hypixel did it as well in his map, The Wither's Challenge.

Best Answer

First, you should add the teams that you want as normal:

enter image description here

For the next part you will need something to edit the NBT data of the world, such as NBTExplorer.

Navigate to your world, and inside that, open data > scoreboard.dat > data > Teams.

Now you should see some 7 entries, these are your teams that you created. You can open them up and check the Names inside to see which is which.

enter image description here

You should see that one of the tags each team has is a Prefix and a Suffix. From here you simply need to double click on the Prefix/Suffix you want to change, and enter the string that you it want to show up as. You can make it anything, and use Formatting Codes to add colour or effects.

enter image description here

(Note I did 2 s/p for Team_1 and 1 s/p for Team_2)

Once you've changed what you want and saved, these should show up as the prefix and suffix of the teams in game.

enter image description here