Additional crash fixes
This commit is contained in:
@@ -298,7 +298,7 @@ public class NetworkIO{
|
|||||||
int maxlen = 32;
|
int maxlen = 32;
|
||||||
|
|
||||||
String host = (headless ? "Server" : players[0].name);
|
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));
|
host = host.substring(0, Math.min(host.length(), maxlen));
|
||||||
map = map.substring(0, Math.min(map.length(), maxlen));
|
map = map.substring(0, Math.min(map.length(), maxlen));
|
||||||
|
|||||||
@@ -41,17 +41,10 @@ public class AdminsDialog extends FloatingDialog{
|
|||||||
ui.showConfirm("$text.confirm", "$text.confirmunadmin", () -> {
|
ui.showConfirm("$text.confirm", "$text.confirmunadmin", () -> {
|
||||||
netServer.admins.unAdminPlayer(info.id);
|
netServer.admins.unAdminPlayer(info.id);
|
||||||
playerGroup.forEach(player -> {
|
playerGroup.forEach(player -> {
|
||||||
if(player.uuid.equals(info.id)){
|
if(player != null && player.uuid != null && player.uuid.equals(info.id)){
|
||||||
player.isAdmin = false;
|
player.isAdmin = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
/*
|
|
||||||
for(Player player : playerGroup.all()){
|
|
||||||
if(player.con != null){
|
|
||||||
player.isAdmin = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
setup();
|
setup();
|
||||||
});
|
});
|
||||||
}).size(h).pad(-14f);
|
}).size(h).pad(-14f);
|
||||||
|
|||||||
Reference in New Issue
Block a user