Add better Fail massage than standard bungee
Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
6fb4866a4e
Commit
861d87e259
@ -18,6 +18,7 @@ import java.io.File;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
public class TablistManager extends BasicListener {
|
public class TablistManager extends BasicListener {
|
||||||
|
|
||||||
@ -78,37 +79,41 @@ public class TablistManager extends BasicListener {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void updateCustomTablist(){
|
private synchronized void updateCustomTablist(){
|
||||||
calcHeader();
|
try{
|
||||||
|
calcHeader();
|
||||||
|
|
||||||
//Calculate server-player-map
|
//Calculate server-player-map
|
||||||
playerMap.clear();
|
playerMap.clear();
|
||||||
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
|
for(ProxiedPlayer player : ProxyServer.getInstance().getPlayers()){
|
||||||
ServerInfo server = player.getServer().getInfo();
|
ServerInfo server = player.getServer().getInfo();
|
||||||
String serverName = server.getName();
|
String serverName = server.getName();
|
||||||
if(serverName.equals("Developer"))
|
if(serverName.equals("Developer"))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
Subserver subserver = Subserver.getSubserver(server);
|
Subserver subserver = Subserver.getSubserver(server);
|
||||||
List<ProxiedPlayer> players;
|
List<ProxiedPlayer> players;
|
||||||
if(subserver != null && subserver.getType() == Servertype.BAUSERVER){
|
if(subserver != null && subserver.getType() == Servertype.BAUSERVER){
|
||||||
players = playerMap.getOrDefault("Bau", new ArrayList<>());
|
players = playerMap.getOrDefault("Bau", new ArrayList<>());
|
||||||
players.add(player);
|
players.add(player);
|
||||||
playerMap.putIfAbsent("Bau", players);
|
playerMap.putIfAbsent("Bau", players);
|
||||||
}else{
|
}else{
|
||||||
players = playerMap.getOrDefault(serverName, new ArrayList<>());
|
players = playerMap.getOrDefault(serverName, new ArrayList<>());
|
||||||
players.add(player);
|
players.add(player);
|
||||||
playerMap.putIfAbsent(serverName, players);
|
playerMap.putIfAbsent(serverName, players);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
playerMap.forEach((server, players) -> players.sort((proxiedPlayer, t1) -> proxiedPlayer.getName().compareToIgnoreCase(t1.getName())));
|
||||||
|
|
||||||
|
//Set size
|
||||||
|
calculateSize();
|
||||||
|
|
||||||
|
for(Tablist tablist : tablists.values())
|
||||||
|
tablist.refresh();
|
||||||
|
|
||||||
|
seconds++;
|
||||||
|
}catch(NullPointerException e){
|
||||||
|
ProxyServer.getInstance().getLogger().log(Level.SEVERE, "NPE", e);
|
||||||
}
|
}
|
||||||
playerMap.forEach((server, players) -> players.sort((proxiedPlayer, t1) -> proxiedPlayer.getName().compareToIgnoreCase(t1.getName())));
|
|
||||||
|
|
||||||
//Set size
|
|
||||||
calculateSize();
|
|
||||||
|
|
||||||
for(Tablist tablist : tablists.values())
|
|
||||||
tablist.refresh();
|
|
||||||
|
|
||||||
seconds++;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren