diff options
author | snowleo <schneeleo@gmail.com> | 2011-11-30 20:48:42 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-11-30 20:49:11 +0100 |
commit | 5e2123c91e44b9ea0a2aa61ca8d889e506274875 (patch) | |
tree | 719c498eba31f10d497e4b21645ebe0b3d045fd9 /EssentialsGeoIP | |
parent | 15d8ec6026a65db176e698db0ec0151f0a1215a4 (diff) | |
download | Essentials-5e2123c91e44b9ea0a2aa61ca8d889e506274875.tar Essentials-5e2123c91e44b9ea0a2aa61ca8d889e506274875.tar.gz Essentials-5e2123c91e44b9ea0a2aa61ca8d889e506274875.tar.lz Essentials-5e2123c91e44b9ea0a2aa61ca8d889e506274875.tar.xz Essentials-5e2123c91e44b9ea0a2aa61ca8d889e506274875.zip |
If Essentials core fails to read one of the configs now, it will disable itself. If other modules detect that Essentials is not enabled, they will be disabled too. EssentialsProtect will go into emergency mode, canceling all events that could hurt your world. Fix the file and either restart or reload the server.
Diffstat (limited to 'EssentialsGeoIP')
-rw-r--r-- | EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java index 6bc0c2022..e0ca6cd7c 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java +++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java @@ -28,13 +28,17 @@ public class EssentialsGeoIP extends JavaPlugin { final PluginManager pm = getServer().getPluginManager(); final IEssentials ess = (IEssentials)pm.getPlugin("Essentials"); - final EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(getDataFolder(), ess); - pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this); - if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) { logger.log(Level.WARNING, _("versionMismatchAll")); } + if (!ess.isEnabled()) { + this.setEnabled(false); + return; + } + final EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(getDataFolder(), ess); + pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this); + logger.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); logger.log(Level.INFO, "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/."); |