From c017fd23a1366c16a6d3b1e94d33331a47d870ef Mon Sep 17 00:00:00 2001 From: yoyosource Date: Wed, 6 Dec 2023 16:53:18 +0100 Subject: [PATCH] Fix Tablist display names for SWTSI --- src/de/steamwar/bungeecore/tablist/Tablist.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/de/steamwar/bungeecore/tablist/Tablist.java b/src/de/steamwar/bungeecore/tablist/Tablist.java index 9c0440ee..a9a088f3 100644 --- a/src/de/steamwar/bungeecore/tablist/Tablist.java +++ b/src/de/steamwar/bungeecore/tablist/Tablist.java @@ -217,6 +217,8 @@ public class Tablist extends MessageToMessageDecoder { if (playerNotOnTeamserver) { item.setDisplayName(new TextComponent()); item.setListed(false); + } else if (item.getDisplayName() == null) { + item.setDisplayName(new TextComponent(item.getUsername())); } item.setPublicKey(null); if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3) @@ -270,6 +272,8 @@ public class Tablist extends MessageToMessageDecoder { if (playerNotOnTeamserver) { item.setDisplayName(new TextComponent()); item.setListed(false); + } else if (item.getDisplayName() == null) { + item.setDisplayName(new TextComponent(item.getUsername())); } item.setPublicKey(null); if(!player.getUniqueId().equals(item.getUuid()) && item.getGamemode() == 3)