summaryrefslogtreecommitdiffstats
path: root/EssentialsGeoIP
diff options
context:
space:
mode:
authorsnowleo <schneeleo@gmail.com>2012-01-24 00:52:08 +0100
committersnowleo <schneeleo@gmail.com>2012-01-24 00:52:08 +0100
commitcc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4 (patch)
treea7cbcd229b4a5c3dee2731b95b3ddc1ccd95df4c /EssentialsGeoIP
parent6af054631fe04ef7a607f24e459e37836c568100 (diff)
parentf93769dd1dd11ef30c77dd6c9e0e5cf275052715 (diff)
downloadEssentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar
Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar.gz
Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar.lz
Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.tar.xz
Essentials-cc0e9aa84bc41e341f04202f1f0d2f3c402cf3f4.zip
Merge branch 'refs/heads/master' into 3.0
The changes to EssChat have not been merged Conflicts: Essentials/src/com/earth2me/essentials/Essentials.java Essentials/src/com/earth2me/essentials/EssentialsEntityListener.java Essentials/src/com/earth2me/essentials/ISettings.java Essentials/src/com/earth2me/essentials/OfflinePlayer.java Essentials/src/com/earth2me/essentials/Settings.java Essentials/src/com/earth2me/essentials/Util.java Essentials/src/com/earth2me/essentials/listener/EssentialsBlockListener.java Essentials/src/com/earth2me/essentials/listener/EssentialsPlayerListener.java Essentials/src/com/earth2me/essentials/listener/EssentialsPluginListener.java Essentials/src/messages.properties Essentials/src/messages_da.properties Essentials/src/messages_de.properties Essentials/src/messages_en.properties Essentials/src/messages_es.properties Essentials/src/messages_fr.properties Essentials/src/messages_nl.properties EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChat.java EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayer.java EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerHighest.java EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerLowest.java EssentialsChat/src/com/earth2me/essentials/chat/EssentialsChatPlayerListenerNormal.java EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectBlockListener.java EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectEntityListener.java EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtectPlayerListener.java EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPPPlayerListener.java
Diffstat (limited to 'EssentialsGeoIP')
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java13
-rw-r--r--EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java8
2 files changed, 8 insertions, 13 deletions
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
index 783684ef8..2fa8b0adf 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java
@@ -3,17 +3,12 @@ package com.earth2me.essentials.geoip;
import static com.earth2me.essentials.I18n._;
import com.earth2me.essentials.api.IEssentials;
import java.util.logging.Level;
-import java.util.logging.Logger;
-import org.bukkit.event.Event.Priority;
-import org.bukkit.event.Event.Type;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
public class EssentialsGeoIP extends JavaPlugin
{
- private static final Logger logger = Logger.getLogger("Minecraft");
-
public EssentialsGeoIP()
{
}
@@ -30,18 +25,16 @@ public class EssentialsGeoIP extends JavaPlugin
final IEssentials ess = (IEssentials)pm.getPlugin("Essentials");
if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion()))
{
- logger.log(Level.WARNING, _("versionMismatchAll"));
+ getLogger().log(Level.WARNING, _("versionMismatchAll"));
}
if (!ess.isEnabled()) {
this.setEnabled(false);
return;
}
final EssentialsGeoIPPlayerListener playerListener = new EssentialsGeoIPPlayerListener(this, ess);
- pm.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Monitor, this);
+ pm.registerEvents(playerListener, this);
ess.addReloadListener(playerListener);
- 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/.");
+ getLogger().log(Level.INFO, "This product includes GeoLite data created by MaxMind, available from http://www.maxmind.com/.");
}
}
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
index aa54dbf25..19cc06dc4 100644
--- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
+++ b/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java
@@ -16,12 +16,14 @@ 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;
import org.bukkit.plugin.Plugin;
-public class EssentialsGeoIPPlayerListener extends PlayerListener implements IReload
+public class EssentialsGeoIPPlayerListener implements Listener, IReload
{
private transient LookupService ls = null;
private static final Logger LOGGER = Logger.getLogger("Minecraft");
@@ -39,7 +41,7 @@ public class EssentialsGeoIPPlayerListener extends PlayerListener implements IRe
onReload();
}
- @Override
+ @EventHandler(priority = EventPriority.MONITOR)
public void onPlayerJoin(final PlayerJoinEvent event)
{
final IUser u = ess.getUser(event.getPlayer());