Hey there, I've seen a bug with prefixing names using scoreboard teams. DISCLAIMER: This uses very slight modding, but the issue doesn't relate to modding
You can use a program like NBTExplorer to change a team's prefix. Normally, this is just for scoreboard teams option <team> color <color> to put, say, §a when setting color to green so that players' names on that team are green.
However, when changing the prefix using a program like NBTExplorer so that it is over 16 characters, it is over the limit and you can not join a server/Realm. The bug here is that if you join a singleplayer world, there is no limit compared to multiplayer worlds and it does not kick you, which is a big pain for testing.
When it went over the limit in a singleplayer world, it would kick me/throw an error in the launcher log/etc.
I could use it just fine over the limit in a singleplayer world, but multiplayer worlds/servers will give me an error. This is a big pain for testing.
Simply add the limit to singleplayer or *.
* I was making prefixes for someone's server world and needed to test it in singleplayer when it worked fine. I gave it to him and he installed it on his server, only to have an error given. This was a big pain for both me and most likely him.