From 6210cdf16dd1697a37253f947332c97addbd2865 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 9 Oct 2021 16:06:14 +0200 Subject: [PATCH] WIP tablist Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/listeners/TablistManager.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/de/steamwar/bungeecore/listeners/TablistManager.java b/src/de/steamwar/bungeecore/listeners/TablistManager.java index 798f113..16b49a2 100644 --- a/src/de/steamwar/bungeecore/listeners/TablistManager.java +++ b/src/de/steamwar/bungeecore/listeners/TablistManager.java @@ -298,10 +298,14 @@ public class TablistManager extends BasicListener { public void print(Tablist viewer, boolean slim) { boolean sameServer = viewer.player.getServer().getInfo() == info; + //TODO: Correct size prediction + //TODO: Devserver SteamwarUser user = SteamwarUser.get(viewer.player.getUniqueId()); for(TablistPlayer player : players){ - if(sameServer || (user.getTeam() != 0 && user.getTeam() == SteamwarUser.get(player.player.getUniqueId()).getTeam())) + if(sameServer) viewer.setSlot(BungeeTabListPlusAPI.getIconFromPlayer(player.player), player.defaultName.startsWith("§7") ? "§f" + player.player.getName() : player.defaultName, 1); + else if(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, 500); else if(!slim || displaySlim(viewer.player, player.player)) viewer.setSlot(BungeeTabListPlusAPI.getIconFromPlayer(player.player), player.defaultName, 500); }