1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-13 10:04:51 +02:00

Removing server layer part 2

This commit is contained in:
snowleo
2012-08-26 20:17:29 +02:00
parent b98021acab
commit 50ab5ffd93
75 changed files with 429 additions and 537 deletions

View File

@@ -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;