As it is in the title, the problem is when I try to change the color of my name with the scoreboard, it doesn't change it, but it is white. This error also occurred in MC 1.13.1 and 1.13.2 and not in versions 1.12 and below.
The code basics are the method of retrieving player etc... all right.
The code is:
Scoreboard tboard = player.getScoreboard();
Team team = tboard.getTeam(player.getName()) == null ? tboard.registerNewTeam(player.getName()) : tboard.getTeam(player.getName());
team.setNameTagVisibility(NameTagVisibility.ALWAYS);
team.setPrefix(ChatColor.translateAlternateColorCodes('&', "&c&lO&6 "));
team.setSuffix("");
player.setScoreboard(tboard);
[media]
Attachments
Comments 3
Oh, I forgot the color code, but it doesn't work either.
I tried to get the scoreboard group with a packet, but I don't come to see how.
Ask on the forums for the API you are using. We cannot help here.
In vanilla 1.13, the 3 values are independently controlled by
/team option <team> color <suffix>
/team option <team> prefix <prefix>
/team option <team> suffix <suffix>
(note that before, vanilla only had color and the prefix/suffix were complete implementation details)
Please note that this tracker isn't a support forum and that we don't provide support for mods and APIs. I'm still going to attempt to answer your question, but I can't say with any level of certainty that it is correct.
Scoreboard prefixes and suffixes are no longer §-based strings, per MC-112693. Instead they are simply text components that are put before and after the message, and are self-contained. There is a separate team color option you can use to change the actual player text. I have no idea how that change is reflected in the API, but that's probably what you need to work with.