Avoid exception on world border check on unloaded world

This commit is contained in:
Mike Primm 2019-05-04 02:44:11 -05:00
parent 1a470fe226
commit c1902a2a9b

View File

@ -240,8 +240,12 @@ public class BukkitWorld extends DynmapWorld {
}
return cnt;
}
private Polygon lastBorder;
@Override
public Polygon getWorldBorder() {
return BukkitVersionHelper.helper.getWorldBorder(world);
if (world != null) {
lastBorder = BukkitVersionHelper.helper.getWorldBorder(world);
}
return lastBorder;
}
}