SteamWar/BungeeCore
Archiviert
13
2
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Lixfel 2020-04-30 15:08:51 +02:00
Ursprung 861d87e259
Commit 771ad5575d

Datei anzeigen

@ -9,6 +9,7 @@ import de.steamwar.bungeecore.Subserver;
import net.md_5.bungee.api.ProxyServer;
import net.md_5.bungee.api.config.ServerInfo;
import net.md_5.bungee.api.connection.ProxiedPlayer;
import net.md_5.bungee.api.connection.Server;
import net.md_5.bungee.api.event.PlayerDisconnectEvent;
import net.md_5.bungee.api.event.PostLoginEvent;
import net.md_5.bungee.event.EventHandler;
@ -79,13 +80,16 @@ public class TablistManager extends BasicListener {
}
private synchronized void updateCustomTablist(){
try{
calcHeader();
//Calculate server-player-map
playerMap.clear();
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
ServerInfo server = player.getServer().getInfo();
Server pserver = player.getServer();
if(pserver == null) //Happens temporarily
continue;
ServerInfo server = pserver.getInfo();
String serverName = server.getName();
if(serverName.equals("Developer"))
continue;
@ -111,9 +115,6 @@ public class TablistManager extends BasicListener {
tablist.refresh();
seconds++;
}catch(NullPointerException e){
ProxyServer.getInstance().getLogger().log(Level.SEVERE, "NPE", e);
}
}
@EventHandler