diff options
Diffstat (limited to 'EssentialsProtect/src/com/earth2me/essentials/protect')
-rw-r--r-- | EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java index bdcb167b8..7a7772ea6 100644 --- a/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java +++ b/EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java @@ -50,14 +50,10 @@ public class EssentialsProtect extends JavaPlugin implements IConf public void onEnable() { - ess = Essentials.getStatic(); - PluginManager pm = this.getServer().getPluginManager(); - Essentials ess = (Essentials)pm.getPlugin("Essentials"); - if (!ess.isEnabled()) - { - pm.enablePlugin(ess); - } + PluginManager pm = this.getServer().getPluginManager(); + ess = Essentials.getStatic(); + ess.getDependancyChecker().checkProtectDependancies(); instance = this; reloadConfig(); @@ -77,7 +73,7 @@ public class EssentialsProtect extends JavaPlugin implements IConf pm.registerEvent(Type.LIGHTNING_STRIKE, weatherListener, Priority.Highest, this); pm.registerEvent(Type.THUNDER_CHANGE, weatherListener, Priority.Highest, this); pm.registerEvent(Type.WEATHER_CHANGE, weatherListener, Priority.Highest, this); - + if (!this.getDescription().getVersion().equals(Essentials.getStatic().getDescription().getVersion())) { logger.log(Level.WARNING, "Version mismatch! Please update all Essentials jars to the same version."); |