summaryrefslogtreecommitdiffstats
path: root/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2011-07-16 01:33:22 +0200
committersnowleo <schneeleo@gmail.com>2011-07-16 01:33:22 +0200
commita38fe6acd4f5f6d7143c818653e9e02209f312db (patch)
tree7a993bdc1260364b8fad6a2d811fd608cb24c70c /EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
parent25c9557c594a065308dbd6dd4835f83c5028c54d (diff)
downloadEssentials-a38fe6acd4f5f6d7143c818653e9e02209f312db.tar
Essentials-a38fe6acd4f5f6d7143c818653e9e02209f312db.tar.gz
Essentials-a38fe6acd4f5f6d7143c818653e9e02209f312db.tar.lz
Essentials-a38fe6acd4f5f6d7143c818653e9e02209f312db.tar.xz
Essentials-a38fe6acd4f5f6d7143c818653e9e02209f312db.zip
Heavy cleanup of all classes
ItemDb is not static anymore Essentials.getStatic() removed
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, 6 insertions, 4 deletions
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
index ef9d9af27..aa919f44b 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
@@ -1,6 +1,7 @@
package com.earth2me.essentials.geoip;
import com.earth2me.essentials.Essentials;
+import com.earth2me.essentials.IEssentials;
import com.earth2me.essentials.Util;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -26,14 +27,15 @@ public class EssentialsGeoIP extends JavaPlugin
@Override
public void onEnable()
{
- PluginManager pm = getServer().getPluginManager();
- EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(getDataFolder());
+ 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(Essentials.getStatic().getDescription().getVersion())) {
+ if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) {
logger.log(Level.WARNING, Util.i18n("versionMismatchAll"));
}
- logger.info(Util.format("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), Essentials.AUTHORS));
+ logger.info(Util.format("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/.");
}