So basically I'm using this class (that I've updated) : PlayerDisplayModifier It allows me to change a player's skin and and it's name (in case if the player is a youtuber and does not want to be focused). The problem is I'm using bukkit scoreboard api to color a player's name (I do it with teams obviously). But when they are disguised, their name appears in white. I actually have no idea on how to change their name's color once they are disguised (via packet I guess is the only solution). I think that I got to give a look at PacketPlayOutScoreboardTeam but I have absolutely no idea what to do. Thank you for any kind of help.
Create an offline player with the new custom gameprofile you generated for them. Then add that offline player to the team, instead of the actual player.