Add external players of teamserver to tablist of player #498
@ -95,9 +95,9 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
|
||||
update.add(tabItem);
|
||||
}
|
||||
}
|
||||
boolean playerOnTeamserver = !Storage.teamServers.containsValue(player.getServer().getInfo());
|
||||
boolean playerOnTeamserver = Storage.teamServers.containsValue(player.getServer().getInfo());
|
||||
for(PlayerListItem.Item item : directTabItems.values()) {
|
||||
if(!playerOnTeamserver && !nonNPCs.contains(item.getUuid()) && !npcs.contains(item.getUuid()) && !player.getUniqueId().equals(item.getUuid())) {
|
||||
if(playerOnTeamserver && !nonNPCs.contains(item.getUuid()) && !npcs.contains(item.getUuid()) && !player.getUniqueId().equals(item.getUuid())) {
|
||||
npcs.add(item.getUuid());
|
||||
addNpc.add(item.getUsername());
|
||||
}
|
||||
@ -211,10 +211,10 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
|
||||
}
|
||||
break;
|
||||
case ADD_PLAYER:
|
||||
boolean playerOnTeamserver = !Storage.teamServers.containsValue(player.getServer().getInfo());
|
||||
boolean playerNotOnTeamserver = !Storage.teamServers.containsValue(player.getServer().getInfo());
|
||||
for (PlayerListItem.Item item : list.getItems()) {
|
||||
item.setPing(1);
|
||||
if (playerOnTeamserver) {
|
||||
if (playerNotOnTeamserver) {
|
||||
item.setDisplayName(new TextComponent());
|
||||
item.setListed(false);
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren