diff --git a/src/de/steamwar/bungeecore/listeners/TablistManager.java b/src/de/steamwar/bungeecore/listeners/TablistManager.java index e7fc6ca..7765ded 100644 --- a/src/de/steamwar/bungeecore/listeners/TablistManager.java +++ b/src/de/steamwar/bungeecore/listeners/TablistManager.java @@ -74,8 +74,8 @@ public class TablistManager extends BasicListener { size = (size+19)/20; - if(size > 4) - size = 4; + if(size > 5) + size = 5; } private synchronized void updateCustomTablist(){ @@ -163,9 +163,9 @@ public class TablistManager extends BasicListener { i++; for (ProxiedPlayer p : playerMap.get(server)){ if(currentServer == p.getServer().getInfo()) - setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), p.getDisplayName(), 1); + setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p), 1); else - setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), "§7" + p.getDisplayName(), 500); + setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), "§7" + getTablistName(p), 500); i++; } } @@ -179,5 +179,22 @@ public class TablistManager extends BasicListener { //Ignore NPE, happens sometimes (only 1s long) when somebody is joining, server switching or disconnecting } } + + private String getTablistName(ProxiedPlayer p){ + if(p.hasPermission("bungeecore.group.admin")) + return "§4" + p.getName(); + else if(p.hasPermission("bungeecore.group.developer")) + return "§3" + p.getName(); + else if(p.hasPermission("bungeecore.group.moderator")) + return "§b" + p.getName(); + else if(p.hasPermission("bungeecore.group.supporter")) + return "§1" + p.getName(); + else if(p.hasPermission("bungeecore.group.builder")) + return "§2" + p.getName(); + else if(p.hasPermission("bungeecore.group.youtuber")) + return "§5" + p.getName(); + else + return p.getName(); + } } }