SteamWar/BungeeCore
Archiviert
13
2

Fix TablistManager add Team visibility #220

Manuell gemergt
Lixfel hat 11 Commits von SlimTeamMemberTab nach master 2021-06-27 07:50:56 +02:00 zusammengeführt
Nur Änderungen aus Commit edbaddbee6 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -176,7 +176,7 @@ public class TablistManager extends BasicListener {
i++;
for (ProxiedPlayer p : playerMap.get(server)){
boolean sameServer = currentServer == p.getServer().getInfo();
setSlot(i % 20, i / 20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p, sameServer), (sameServer ? 1 : 500));
setSlot(i % 20, i / 20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p), (sameServer ? 1 : 500));
i++;
}
}
@ -225,7 +225,7 @@ public class TablistManager extends BasicListener {
i++;
for (ProxiedPlayer p : players){
boolean sameServer = currentServer == p.getServer().getInfo();
setSlot(i % 20, i / 20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p, sameServer), (sameServer ? 1 : 500));
setSlot(i % 20, i / 20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p), (sameServer ? 1 : 500));
i++;
}
}
@ -245,7 +245,7 @@ public class TablistManager extends BasicListener {
return team.getTeamId() <= 0 ? null : team;
}
private String getTablistName(ProxiedPlayer p, boolean sameServer) {
private String getTablistName(ProxiedPlayer p) {
Subserver server = Subserver.getSubserver(p);
if(server != null){
String tablistName = server.getTablistNames().get(p);
@ -256,13 +256,14 @@ public class TablistManager extends BasicListener {
StringBuilder st = new StringBuilder();
UserGroup group = SteamwarUser.get(p).getUserGroup();
//else st.append("§7");
if(group == UserGroup.Member && sameServer)
st.append("§f");
else
if (group == UserGroup.Member) {
Team team = getTeam(player);
if (team != null && team == getTeam(p)) st.append("§f");
else st.append("§7");
} else {
st.append(group.getColorCode());
}
// if (!sameServer) st.append("§o");
return st.append(p.getName()).toString();
}
}