summaryrefslogtreecommitdiffstats
path: root/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
diff options
context:
space:
mode:
Diffstat (limited to 'EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java')
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java10
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/.");