Additional crash fixes

This commit is contained in:
Anuken
2018-11-30 13:49:43 -05:00
parent b0b16b52ee
commit 58b87aa999
2 changed files with 2 additions and 9 deletions

View File

@@ -298,7 +298,7 @@ public class NetworkIO{
int maxlen = 32;
String host = (headless ? "Server" : players[0].name);
String map = world.getMap().name;
String map = world.getMap() == null ? "None" : world.getMap().name;
host = host.substring(0, Math.min(host.length(), maxlen));
map = map.substring(0, Math.min(map.length(), maxlen));

View File

@@ -41,17 +41,10 @@ public class AdminsDialog extends FloatingDialog{
ui.showConfirm("$text.confirm", "$text.confirmunadmin", () -> {
netServer.admins.unAdminPlayer(info.id);
playerGroup.forEach(player -> {
if(player.uuid.equals(info.id)){
if(player != null && player.uuid != null && player.uuid.equals(info.id)){
player.isAdmin = false;
}
});
/*
for(Player player : playerGroup.all()){
if(player.con != null){
player.isAdmin = false;
break;
}
}*/
setup();
});
}).size(h).pad(-14f);