mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 11:49:12 +00:00
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
2 changed files with 6 additions and 1 deletions
|
@ -238,7 +238,8 @@ getposCommandUsage=/<command> [player]
|
|||
giveCommandDescription=Give a player an item.
|
||||
giveCommandUsage=/<command> <player> <item|numeric> [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.
|
||||
|
|
|
@ -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)) {
|
||||
|
|
Loading…
Reference in a new issue