From 50ab5ffd935ee10f0a42d7aabcce6d438cf57dcb Mon Sep 17 00:00:00 2001 From: snowleo Date: Sun, 26 Aug 2012 20:17:29 +0200 Subject: Removing server layer part 2 --- EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'EssentialsGeoIP') diff --git a/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java index 9767f213b..265a47947 100644 --- a/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java +++ b/EssentialsGeoIP/src/net/ess3/geoip/EssentialsGeoIP.java @@ -3,6 +3,7 @@ package net.ess3.geoip; import static net.ess3.I18n._; import net.ess3.api.IEssentials; import java.util.logging.Level; +import net.ess3.api.IPlugin; import org.bukkit.plugin.PluginManager; import org.bukkit.plugin.java.JavaPlugin; @@ -13,12 +14,13 @@ public class EssentialsGeoIP extends JavaPlugin public void onEnable() { final PluginManager pm = getServer().getPluginManager(); - final IEssentials ess = (IEssentials)pm.getPlugin("Essentials-3"); - if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) + final IPlugin plugin = (IPlugin)pm.getPlugin("Essentials-3"); + final IEssentials ess = (IEssentials)plugin.getEssentials(); + if (!this.getDescription().getVersion().equals(plugin.getDescription().getVersion())) { getLogger().log(Level.WARNING, _("versionMismatchAll")); } - if (!ess.isEnabled()) + if (!plugin.isEnabled()) { this.setEnabled(false); return; -- cgit v1.2.3