From 47291dff2740776802230f56e916122462d9ab98 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 21 Aug 2021 19:00:27 +0200 Subject: [PATCH] Team highlightning Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/listeners/TablistManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/listeners/TablistManager.java b/src/de/steamwar/bungeecore/listeners/TablistManager.java index 9a0e5e3..f82a05c 100644 --- a/src/de/steamwar/bungeecore/listeners/TablistManager.java +++ b/src/de/steamwar/bungeecore/listeners/TablistManager.java @@ -297,8 +297,9 @@ public class TablistManager extends BasicListener { public void print(Tablist viewer, boolean slim) { boolean sameServer = viewer.player.getServer().getInfo() == info; + SteamwarUser user = SteamwarUser.get(viewer.player.getUniqueId()); for(TablistPlayer player : players){ - if(sameServer) + if(sameServer || (user.getTeam() != 0 && user.getTeam() == SteamwarUser.get(player.player.getUniqueId()).getTeam())) viewer.setSlot(BungeeTabListPlusAPI.getIconFromPlayer(player.player), player.defaultName.startsWith("§7") ? "§f" + player.player.getName() : player.defaultName, 1); else if(!slim || displaySlim(viewer.player, player.player)) viewer.setSlot(BungeeTabListPlusAPI.getIconFromPlayer(player.player), player.defaultName, 500);