I want to change the list that is displayed when a player presses the tab key. I have used player.setPlayerListName(ChatColor.GREEN +" new Name")
to change a player name and player.setPlayerListHeaderFooter("header", "footer");
to set the header/footer displayed in this list.
Now I want to make different people see different player names in the list, this would be used to hide moderators in the tab list and show different roles in minigames.
My example: I have a minigame that contains different roles, but not everyone should be able to see them on the table list, only players who are on the same team should be able to see their team members. Let's say I have 3 teams:
- Team1 (2 players)
- Team2 (2 players)
- Team3 (2 players)
Everyone in Team1 should see their team members with their assigned team name in the table list. Everyone else would only be shown in white for Team1, so they cannot see which team they are on.
The same applies to Team2 and Team3.
This is an example, there is no need to lecture the players.
I've used ProtocolLib and Packets, in general, a few times so there shouldn't be a problem with it. What should I use? Thanks for your help :D