diff options
author | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-06-03 14:23:55 +0000 |
---|---|---|
committer | ementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb> | 2011-06-03 14:23:55 +0000 |
commit | e94a01b149464032ce9049b7800bb793d3bd25d8 (patch) | |
tree | 8cabd0f60dff80b98407e6c82dd5e1d4074e16b0 /EssentialsProtect/src/com/earth2me/essentials/protect | |
parent | 1a572bca2ef0dd1424f820b606f9fbbae84a4da6 (diff) | |
download | Essentials-e94a01b149464032ce9049b7800bb793d3bd25d8.tar Essentials-e94a01b149464032ce9049b7800bb793d3bd25d8.tar.gz Essentials-e94a01b149464032ce9049b7800bb793d3bd25d8.tar.lz Essentials-e94a01b149464032ce9049b7800bb793d3bd25d8.tar.xz Essentials-e94a01b149464032ce9049b7800bb793d3bd25d8.zip |
[trunk] Adding dependancy checker, need to fix timings as Protect tries to use it before the file system finishes
git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1579 e251c2fe-e539-e718-e476-b85c1f46cddb
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."); |