geforkt von SteamWar/BungeeCore
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);
|
setSlot(i%20, i/20, gray, "§7§l" + server, 1000);
|
||||||
i++;
|
i++;
|
||||||
for (ProxiedPlayer p : playerMap.get(server)){
|
for (ProxiedPlayer p : playerMap.get(server)){
|
||||||
if(currentServer == p.getServer().getInfo())
|
boolean sameServer = currentServer == p.getServer().getInfo();
|
||||||
setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p), 1);
|
setSlot(i % 20, i / 20, BungeeTabListPlusAPI.getIconFromPlayer(p), getTablistName(p, sameServer), (sameServer ? 1 : 500));
|
||||||
else
|
|
||||||
setSlot(i%20, i/20, BungeeTabListPlusAPI.getIconFromPlayer(p), "§7" + getTablistName(p), 500);
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -199,21 +197,18 @@ public class TablistManager extends BasicListener {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getTablistName(ProxiedPlayer p){
|
private String getTablistName(ProxiedPlayer p, boolean sameServer) {
|
||||||
if(p.hasPermission("bungeecore.group.admin"))
|
StringBuilder st = new StringBuilder();
|
||||||
return "§4" + p.getName();
|
if (p.hasPermission("bungeecore.group.admin")) st.append("§4");
|
||||||
else if(p.hasPermission("bungeecore.group.developer"))
|
else if (p.hasPermission("bungeecore.group.developer")) st.append("§3");
|
||||||
return "§3" + p.getName();
|
else if (p.hasPermission("bungeecore.group.moderator")) st.append("§b");
|
||||||
else if(p.hasPermission("bungeecore.group.moderator"))
|
else if (p.hasPermission("bungeecore.group.supporter")) st.append("§1");
|
||||||
return "§b" + p.getName();
|
else if (p.hasPermission("bungeecore.group.builder")) st.append("§2");
|
||||||
else if(p.hasPermission("bungeecore.group.supporter"))
|
else if (p.hasPermission("bungeecore.group.youtuber")) st.append("§5");
|
||||||
return "§1" + p.getName();
|
else st.append("§7");
|
||||||
else if(p.hasPermission("bungeecore.group.builder"))
|
|
||||||
return "§2" + p.getName();
|
if (sameServer) st.append("§l");
|
||||||
else if(p.hasPermission("bungeecore.group.youtuber"))
|
return st.append(p.getName()).toString();
|
||||||
return "§5" + p.getName();
|
|
||||||
else
|
|
||||||
return p.getName();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren