geforkt von SteamWar/BungeeCore
Hotfix tablist
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
bf2a4822ef
Commit
89f1a17c91
@ -90,7 +90,6 @@ public class TablistManager extends BasicListener {
|
|||||||
//Calculate server-player-map
|
//Calculate server-player-map
|
||||||
tablist = new TablistGroup(true, "");
|
tablist = new TablistGroup(true, "");
|
||||||
TablistGroup bau = new TablistGroup(false, "Bau");
|
TablistGroup bau = new TablistGroup(false, "Bau");
|
||||||
tablist.addSubTablist(bau);
|
|
||||||
for (ServerInfo server : ProxyServer.getInstance().getServers().values()){
|
for (ServerInfo server : ProxyServer.getInstance().getServers().values()){
|
||||||
if(server.getPlayers().isEmpty())
|
if(server.getPlayers().isEmpty())
|
||||||
continue;
|
continue;
|
||||||
@ -103,6 +102,8 @@ public class TablistManager extends BasicListener {
|
|||||||
else
|
else
|
||||||
tablist.addSubTablist(new TablistServer(server));
|
tablist.addSubTablist(new TablistServer(server));
|
||||||
}
|
}
|
||||||
|
if(bau.size() > 0)
|
||||||
|
tablist.addSubTablist(bau);
|
||||||
|
|
||||||
size = (int) Math.ceil(tablist.size() / 20.0);
|
size = (int) Math.ceil(tablist.size() / 20.0);
|
||||||
tablists.values().forEach(Tablist::refresh);
|
tablists.values().forEach(Tablist::refresh);
|
||||||
@ -213,7 +214,7 @@ public class TablistManager extends BasicListener {
|
|||||||
public void print(Tablist viewer, boolean slim) {
|
public void print(Tablist viewer, boolean slim) {
|
||||||
subTablists.forEach(tablist -> {
|
subTablists.forEach(tablist -> {
|
||||||
if(withHeaders)
|
if(withHeaders)
|
||||||
viewer.setSlot(gray, "§l" + tablist.name(), 1000);
|
viewer.setSlot(gray, "§l§7" + tablist.name(), 1000);
|
||||||
tablist.print(viewer, slim);
|
tablist.print(viewer, slim);
|
||||||
if(withHeaders)
|
if(withHeaders)
|
||||||
viewer.setSlot(darkGray, "", 1000);
|
viewer.setSlot(darkGray, "", 1000);
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren