SteamWar/BungeeCore
Archiviert
13
2

Remove some useless boolean inverts
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Dieser Commit ist enthalten in:
yoyosource 2023-12-06 16:38:42 +01:00
Ursprung 56a9bd077c
Commit bfefd5a197

Datei anzeigen

@ -95,9 +95,9 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
update.add(tabItem); 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()) { 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()); npcs.add(item.getUuid());
addNpc.add(item.getUsername()); addNpc.add(item.getUsername());
} }
@ -211,10 +211,10 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
} }
break; break;
case ADD_PLAYER: 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()) { for (PlayerListItem.Item item : list.getItems()) {
item.setPing(1); item.setPing(1);
if (playerOnTeamserver) { if (playerNotOnTeamserver) {
item.setDisplayName(new TextComponent()); item.setDisplayName(new TextComponent());
item.setListed(false); item.setListed(false);
} }