diff --git a/Essentials/src/messages.properties b/Essentials/src/messages.properties index 0965cdabe..d4d99ce72 100644 --- a/Essentials/src/messages.properties +++ b/Essentials/src/messages.properties @@ -238,7 +238,8 @@ getposCommandUsage=/ [player] giveCommandDescription=Give a player an item. giveCommandUsage=/ [amount [itemmeta...]] geoipCantFind=\u00a76Player \u00a7c{0} \u00a76comes from \u00a7aan unknown country\u00a76. -geoIpLicenseMissing=No license key found! Please visit https://essentialsx.cf/geoip for first time setup instructions. +geoIpErrorOnJoin=Unable to fetch GeoIP data for {0}. Please ensure that your license key and configuration are correct. +geoIpLicenseMissing=No license key found\! Please visit https\://essentialsx.net/geoip for first time setup instructions. geoIpUrlEmpty=GeoIP download url is empty. geoIpUrlInvalid=GeoIP download url is invalid. givenSkull=\u00a76You have been given the skull of \u00a7c{0}\u00a76. diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java index a7850b96d..b969cbf8b 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java +++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java @@ -56,6 +56,10 @@ public class EssentialsGeoIPPlayerListener implements Listener, IConf { InetAddress address = player.getAddress().getAddress(); StringBuilder sb = new StringBuilder(); + if (mmreader == null) { + logger.log(Level.WARNING, tl("geoIpErrorOnJoin", u.getName())); + return; + } try { if (config.getBoolean("database.show-cities", false)) {