don't return maxmind data if it failed to load
All checks were successful
Deploy App / docker (ubuntu-latest, 2.44.0, 17, 3.8.5) (push) Successful in 1m22s

This commit is contained in:
Lee
2024-04-21 23:33:40 +01:00
parent 2ad5556041
commit 67efda71d2
2 changed files with 8 additions and 2 deletions

View File

@ -191,6 +191,9 @@ public class MinecraftServer {
* @return the location of the server
*/
public static GeoLocation fromMaxMind(CityResponse response) {
if (response == null) {
return null;
}
return new GeoLocation(
response.getCountry().getName(),
response.getMostSpecificSubdivision().getName(),