summaryrefslogtreecommitdiffstats
path: root/EssentialsProtect/src/com/earth2me
diff options
context:
space:
mode:
authorementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-06-03 14:23:55 +0000
committerementalo <ementalo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-06-03 14:23:55 +0000
commit91c80d45e665b8785bbe6515925dfc22a6809fe1 (patch)
tree9b3693bd56057b878ff8fc2b750c7e7685c6f222 /EssentialsProtect/src/com/earth2me
parent36ee673798b81b2dc641e2825f4d3b45c58bd218 (diff)
downloadEssentials-91c80d45e665b8785bbe6515925dfc22a6809fe1.tar
Essentials-91c80d45e665b8785bbe6515925dfc22a6809fe1.tar.gz
Essentials-91c80d45e665b8785bbe6515925dfc22a6809fe1.tar.lz
Essentials-91c80d45e665b8785bbe6515925dfc22a6809fe1.tar.xz
Essentials-91c80d45e665b8785bbe6515925dfc22a6809fe1.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')
-rw-r--r--EssentialsProtect/src/com/earth2me/essentials/protect/EssentialsProtect.java12
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.");