Merge pull request 'Add TablistReadability by Bold names on same Server' (#106) from TablistReadability into master
Reviewed-by: Lixfel <lixfel@steamwar.de>
Dieser Commit ist enthalten in:
Commit
bc6e9cb646
@ -181,10 +181,8 @@ public class TablistManager extends BasicListener {
|
||||
setSlot(i%20, i/20, gray, "§7§l" + server, 1000);
|
||||
i++;
|
||||
for (ProxiedPlayer p : playerMap.get(server)){
|
||||
if(currentServer == p.getServer().getInfo())
|
||||
setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p), 1);
|
||||
else
|
||||
setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), "§7" + getTablistName(p), 500);
|
||||
boolean sameServer = currentServer == p.getServer().getInfo();
|
||||
setSlot(i % 20, i / 20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p, sameServer), (sameServer ? 1 : 500));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -199,21 +197,18 @@ public class TablistManager extends BasicListener {
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
private String getTablistName(ProxiedPlayer p, boolean sameServer) {
|
||||
StringBuilder st = new StringBuilder();
|
||||
if (p.hasPermission("bungeecore.group.admin")) st.append("§4");
|
||||
else if (p.hasPermission("bungeecore.group.developer")) st.append("§3");
|
||||
else if (p.hasPermission("bungeecore.group.moderator")) st.append("§b");
|
||||
else if (p.hasPermission("bungeecore.group.supporter")) st.append("§1");
|
||||
else if (p.hasPermission("bungeecore.group.builder")) st.append("§2");
|
||||
else if (p.hasPermission("bungeecore.group.youtuber")) st.append("§5");
|
||||
else st.append("§7");
|
||||
|
||||
if (sameServer) st.append("§l");
|
||||
return st.append(p.getName()).toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren