From 5e2123c91e44b9ea0a2aa61ca8d889e506274875 Mon Sep 17 00:00:00 2001 From: snowleo Date: Wed, 30 Nov 2011 20:48:42 +0100 Subject: If Essentials core fails to read one of the configs now, it will disable itself. If other modules detect that Essentials is not enabled, they will be disabled too. EssentialsProtect will go into emergency mode, canceling all events that could hurt your world. Fix the file and either restart or reload the server. --- .../src/com/earth2me/essentials/spawn/EssentialsSpawn.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'EssentialsSpawn') diff --git a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java index 8ffdb5c97..256faf6c7 100644 --- a/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java +++ b/EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java @@ -21,15 +21,18 @@ public class EssentialsSpawn extends JavaPlugin { final PluginManager pluginManager = getServer().getPluginManager(); ess = (IEssentials)pluginManager.getPlugin("Essentials"); - final EssentialsSpawnPlayerListener playerListener = new EssentialsSpawnPlayerListener(ess); - pluginManager.registerEvent(Type.PLAYER_RESPAWN, playerListener, Priority.Low, this); - pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Low, this); - - if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) { LOGGER.log(Level.WARNING, _("versionMismatchAll")); } + if (!ess.isEnabled()) { + this.setEnabled(false); + return; + } + final EssentialsSpawnPlayerListener playerListener = new EssentialsSpawnPlayerListener(ess); + pluginManager.registerEvent(Type.PLAYER_RESPAWN, playerListener, Priority.Low, this); + pluginManager.registerEvent(Type.PLAYER_JOIN, playerListener, Priority.Low, this); + LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); } -- cgit v1.2.3 From 4f8be31343c62fc7a45de942bcbfd390a91a88d0 Mon Sep 17 00:00:00 2001 From: snowleo Date: Thu, 1 Dec 2011 01:35:48 +0100 Subject: Cleanup of the library folder Also: we don't use the mysql.jar/sqlite.jar anymore, since it is included in craftbukkit. I don't know why this reference in config.yml still exists. --- EssentialsSpawn/nbproject/project.properties | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'EssentialsSpawn') diff --git a/EssentialsSpawn/nbproject/project.properties b/EssentialsSpawn/nbproject/project.properties index 16c272f09..96f4448ec 100644 --- a/EssentialsSpawn/nbproject/project.properties +++ b/EssentialsSpawn/nbproject/project.properties @@ -79,8 +79,7 @@ javac.target=1.6 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ - ${libs.junit.classpath}:\ - ${libs.junit_4.classpath} + ${libs.junit_4.10.classpath} javac.test.processorpath=\ ${javac.test.classpath} javadoc.additionalparam= -- cgit v1.2.3