Archiviert
1
0

Merge pull request 'Fix Tablist' (#499) from BetterSWTCITablistIntegration into master

Reviewed-on: SteamWar/BungeeCore#499
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2023-12-06 16:50:44 +01:00
Commit a05ec1d6d9

Datei anzeigen

@ -261,13 +261,16 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
return; return;
} }
boolean playerNotOnTeamserver = !Storage.teamServers.containsValue(player.getServer().getInfo());
for(PlayerListItemUpdate.Action action : actions) { for(PlayerListItemUpdate.Action action : actions) {
switch (action) { switch (action) {
case ADD_PLAYER: case ADD_PLAYER:
for (PlayerListItem.Item item : list.getItems()) { for (PlayerListItem.Item item : list.getItems()) {
item.setPing(1); item.setPing(1);
if (playerNotOnTeamserver) {
item.setDisplayName(new TextComponent()); item.setDisplayName(new TextComponent());
item.setListed(false); item.setListed(false);
}
item.setPublicKey(null); item.setPublicKey(null);
if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3) if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3)
item.setGamemode(1); item.setGamemode(1);