Improve GeoIP errors/warnings (#3568)
Aims to provide a better and less confusing error for users of GeoIP who have not configured properly (which is more common now after the license key requirement). Seems like a lot of people miss the initial error on startup, and so this may help a bit. Closes #3561.
This commit is contained in:
parent
1ef4e15a4d
commit
68d0aa9688
|
@ -238,7 +238,8 @@ getposCommandUsage=/<command> [player]
|
||||||
giveCommandDescription=Give a player an item.
|
giveCommandDescription=Give a player an item.
|
||||||
giveCommandUsage=/<command> <player> <item|numeric> [amount [itemmeta...]]
|
giveCommandUsage=/<command> <player> <item|numeric> [amount [itemmeta...]]
|
||||||
geoipCantFind=\u00a76Player \u00a7c{0} \u00a76comes from \u00a7aan unknown country\u00a76.
|
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.
|
geoIpUrlEmpty=GeoIP download url is empty.
|
||||||
geoIpUrlInvalid=GeoIP download url is invalid.
|
geoIpUrlInvalid=GeoIP download url is invalid.
|
||||||
givenSkull=\u00a76You have been given the skull of \u00a7c{0}\u00a76.
|
givenSkull=\u00a76You have been given the skull of \u00a7c{0}\u00a76.
|
||||||
|
|
|
@ -56,6 +56,10 @@ public class EssentialsGeoIPPlayerListener implements Listener, IConf {
|
||||||
InetAddress address = player.getAddress().getAddress();
|
InetAddress address = player.getAddress().getAddress();
|
||||||
StringBuilder sb = new StringBuilder();
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
if (mmreader == null) {
|
||||||
|
logger.log(Level.WARNING, tl("geoIpErrorOnJoin", u.getName()));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (config.getBoolean("database.show-cities", false)) {
|
if (config.getBoolean("database.show-cities", false)) {
|
||||||
|
|
Loading…
Reference in New Issue