SteamWar/BungeeCore
Archiviert
13
2

Merge pull request 'Fix Tablist display names for SWTSI' (#500) from BetterSWTCITablistIntegration into master
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

Reviewed-on: #500
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Lixfel 2023-12-06 16:55:44 +01:00
Commit 3d67919f0a

Datei anzeigen

@ -217,6 +217,8 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
if (playerNotOnTeamserver) { if (playerNotOnTeamserver) {
item.setDisplayName(new TextComponent()); item.setDisplayName(new TextComponent());
item.setListed(false); item.setListed(false);
} else if (item.getDisplayName() == null) {
item.setDisplayName(new TextComponent(item.getUsername()));
} }
item.setPublicKey(null); item.setPublicKey(null);
if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3) if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3)
@ -270,6 +272,8 @@ public class Tablist extends MessageToMessageDecoder<PacketWrapper> {
if (playerNotOnTeamserver) { if (playerNotOnTeamserver) {
item.setDisplayName(new TextComponent()); item.setDisplayName(new TextComponent());
item.setListed(false); item.setListed(false);
} else if (item.getDisplayName() == null) {
item.setDisplayName(new TextComponent(item.getUsername()));
} }
item.setPublicKey(null); item.setPublicKey(null);
if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3) if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3)