1
0
mirror of https://github.com/Anuken/Mindustry.git synced 2024-09-22 22:07:31 +03:00

Fixed dedicated server crash

This commit is contained in:
Anuken 2018-05-21 11:27:06 -04:00
parent ed232248a2
commit 3b0c66429c

View File

@ -559,6 +559,10 @@ public class ServerControl extends Module {
boolean found = false;
for (Player player : playerGroup.all()) {
if(Net.getConnection(player.clientid) == null){
err("Player \"{0}\" does not have an associated connection!");
continue;
}
TraceInfo info = netServer.admins.getTrace(Net.getConnection(player.clientid).address);
if(info.totalBlocksBroken >= minbreak && info.totalBlocksBroken / Math.max(info.totalBlocksPlaced, 1f) >= ratio){
info("&ly - Player '{0}' / UUID &lm{1}&ly found: &lc{2}&ly broken and &lc{3}&ly placed.",