diff options
author | ementalo <ementalodev@gmx.co.uk> | 2012-07-17 12:26:55 +0100 |
---|---|---|
committer | ementalo <ementalodev@gmx.co.uk> | 2012-07-17 14:21:03 +0100 |
commit | a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3 (patch) | |
tree | 2aa10b6300f6c8d3cb2b298c124180fade74857a /EssentialsGeoIP/src | |
parent | 3c385e69271dfe8530fadc3f67e13ee495e4b0e1 (diff) | |
parent | 9f05e43ecf8e6e1a8fcaef757678e762f0d82573 (diff) | |
download | Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar.gz Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar.lz Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.tar.xz Essentials-a661bce7b3de3f53e2b7b79c1283f0affa6fe9c3.zip |
Merge of server-layer branch
Diffstat (limited to 'EssentialsGeoIP/src')
-rw-r--r-- | EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java (renamed from EssentialsGeoIP/src/com/earth2me/essentials/geoip/ConfigHolder.java) | 12 | ||||
-rw-r--r-- | EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java (renamed from EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java) | 16 | ||||
-rw-r--r-- | EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java (renamed from EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java) | 6 | ||||
-rw-r--r-- | EssentialsGeoIP/src/plugin.yml | 4 |
4 files changed, 22 insertions, 16 deletions
diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/ConfigHolder.java b/EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java index 39d7528df..068a1ba45 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/ConfigHolder.java +++ b/EssentialsGeoIP/src/net/ess3/geoip/ConfigHolder.java @@ -1,4 +1,4 @@ -package com.earth2me.essentials.geoip; +package net.ess3.geoip; import net.ess3.api.IEssentials; import net.ess3.settings.geoip.GeoIP; @@ -7,6 +7,7 @@ import java.io.File; import java.io.IOException; import org.bukkit.plugin.Plugin; + public class ConfigHolder extends AsyncStorageObjectHolder<GeoIP> { private final transient Plugin geoip; @@ -24,4 +25,13 @@ public class ConfigHolder extends AsyncStorageObjectHolder<GeoIP> return new File(geoip.getDataFolder(), "config.yml"); } + @Override + public void finishRead() + { + } + + @Override + public void finishWrite() + { + } } diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java index 125ba3144..9767f213b 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIP.java +++ b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java @@ -1,4 +1,4 @@ -package com.earth2me.essentials.geoip; +package net.ess3.geoip; import static net.ess3.I18n._; import net.ess3.api.IEssentials; @@ -9,25 +9,17 @@ import org.bukkit.plugin.java.JavaPlugin; public class EssentialsGeoIP extends JavaPlugin { - public EssentialsGeoIP() - { - } - - @Override - public void onDisable() - { - } - @Override public void onEnable() { final PluginManager pm = getServer().getPluginManager(); - final IEssentials ess = (IEssentials)pm.getPlugin("Essentials3"); + final IEssentials ess = (IEssentials)pm.getPlugin("Essentials-3"); if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) { getLogger().log(Level.WARNING, _("versionMismatchAll")); } - if (!ess.isEnabled()) { + if (!ess.isEnabled()) + { this.setEnabled(false); return; } diff --git a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java index c0fbfa9f7..14554e3a9 100644 --- a/EssentialsGeoIP/src/com/earth2me/essentials/geoip/EssentialsGeoIPPlayerListener.java +++ b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIPPlayerListener.java @@ -1,4 +1,4 @@ -package com.earth2me.essentials.geoip; +package net.ess3.geoip; import static net.ess3.I18n._; import net.ess3.api.IEssentials; @@ -53,7 +53,11 @@ public class EssentialsGeoIPPlayerListener implements Listener, IReload config.acquireReadLock(); try { + if (event.getPlayer().getAddress() == null || event.getPlayer().getAddress().getAddress() == null) { + return; + } final InetAddress address = event.getPlayer().getAddress().getAddress(); + final StringBuilder builder = new StringBuilder(); if (config.getData().getDatabase().isShowCities()) { diff --git a/EssentialsGeoIP/src/plugin.yml b/EssentialsGeoIP/src/plugin.yml index 9d55446bd..709e6d92b 100644 --- a/EssentialsGeoIP/src/plugin.yml +++ b/EssentialsGeoIP/src/plugin.yml @@ -1,9 +1,9 @@ # This determines the command prefix when there are conflicts (/name:home, /name:help, etc.) name: EssentialsGeoIP -main: com.earth2me.essentials.geoip.EssentialsGeoIP +main: net.ess3.geoip.EssentialsGeoIP # Note to developers: This next line cannot change, or the automatic versioning system will break. version: ${build.number} website: http://tiny.cc/EssentialsWiki description: Shows the country or city of a user on login and /whois. authors: [Zenexer, ementalo, Aelux, Brettflan, KimKandor, snowleo, ceulemans, Xeology, KHobbits] -depend: [Essentials3]
\ No newline at end of file +depend: [Essentials-3]
\ No newline at end of file |