summaryrefslogtreecommitdiffstats
path: root/EssentialsGeoIP
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2012-01-20 05:20:37 +0100
committersnowleo <schneeleo@gmail.com>2012-01-20 05:20:37 +0100
commit3315019203f6ac217bcc8fc751e5067fa3b147c0 (patch)
tree28e2695fb1eb37eff4ec76549a64ec819019ca10 /EssentialsGeoIP
parent6ff7e6fd254a105364bcf30a054748adcf6005a1 (diff)
downloadEssentials-3315019203f6ac217bcc8fc751e5067fa3b147c0.tar
Essentials-3315019203f6ac217bcc8fc751e5067fa3b147c0.tar.gz
Essentials-3315019203f6ac217bcc8fc751e5067fa3b147c0.tar.lz
Essentials-3315019203f6ac217bcc8fc751e5067fa3b147c0.tar.xz
Essentials-3315019203f6ac217bcc8fc751e5067fa3b147c0.zip
Update for new CraftBukkit Event Code
EssentialsSpawn can't be updated yet, because the new event system lacks dynamic priorities.
Diffstat (limited to 'EssentialsGeoIP')
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java2
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java8
2 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 e0ca6cd7c..5700a7472 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
@@ -37,7 +37,7 @@ public class EssentialsGeoIP extends JavaPlugin
return;
}
final EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(getDataFolder(), ess);
- pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
+ pm.registerEvents(playerListener, this);
logger.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team"));
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
index ee187c2aa..0018d09b4 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
@@ -17,11 +17,13 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import org.bukkit.entity.Player;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.EventPriority;
+import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
-import org.bukkit.event.player.PlayerListener;
-public class EssentialsGeoIPPlayerListener extends PlayerListener implements IConf
+public class EssentialsGeoIPPlayerListener implements Listener, IConf
{
LookupService ls = null;
private static final Logger logger = Logger.getLogger("Minecraft");
@@ -39,7 +41,7 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements ICo
reloadConfig();
}
- @Override
+ @EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(PlayerJoinEvent event)
{
User u = ess.getUser(event.getPlayer());