I’ve been trying to create teams within my plugin’s scoreboard to give every player their own prefix and suffix but it’s not appearing for anyone at all. I can confirm the teams exist and the players have been added to their own teams accordingly.
I tried going through this thread (and many, many others) but it didn’t seem to get me going.
Code can be found here.
getTeamName returns a simple unique string for each user
based on your prefix being TextColor.GREY with no text, im guessing your attempting to change the players text colour. Sadly this isnt possible as the prefix and suffix are isolated.
I also wrote the code from the example from memory, so some parts are bound to be missing
Sorry for the confusion. Both prefix and suffix are strings that contain per-player information. I took them out in attempt to make the snippet smaller while still providing enough information.
Scoreboard instances can exist, however a
Player can only see one scoreboard so you have to use
Player#setScoreboard to select the one that the player should see. Without specifying, a player will only see the default server scoreboard, not yours.
Ah, so I missed out on the
Player#setScoreboard function then. I’ll try it out, thank you.