Change to bigger & better Tablist
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
61c2a7f3a6
Commit
4579551242
@ -74,8 +74,8 @@ public class TablistManager extends BasicListener {
|
|||||||
|
|
||||||
size = (size+19)/20;
|
size = (size+19)/20;
|
||||||
|
|
||||||
if(size > 4)
|
if(size > 5)
|
||||||
size = 4;
|
size = 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void updateCustomTablist(){
|
private synchronized void updateCustomTablist(){
|
||||||
@ -163,9 +163,9 @@ public class TablistManager extends BasicListener {
|
|||||||
i++;
|
i++;
|
||||||
for (ProxiedPlayer p : playerMap.get(server)){
|
for (ProxiedPlayer p : playerMap.get(server)){
|
||||||
if(currentServer == p.getServer().getInfo())
|
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
|
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++;
|
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
|
//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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren