diff options
Diffstat (limited to 'EssentialsXMPP')
-rw-r--r-- | EssentialsXMPP/build.xml | 2 | ||||
-rw-r--r-- | EssentialsXMPP/nbproject/project.properties | 7 | ||||
-rw-r--r-- | EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java | 18 |
3 files changed, 15 insertions, 12 deletions
diff --git a/EssentialsXMPP/build.xml b/EssentialsXMPP/build.xml index 1edb37153..2e92ef710 100644 --- a/EssentialsXMPP/build.xml +++ b/EssentialsXMPP/build.xml @@ -74,7 +74,7 @@ <target name="-post-jar"> <jar jarfile="${dist.dir}/EssentialsXMPP.jar"> <zipfileset src="${dist.jar}" excludes="META-INF/*" /> - <zipfileset src="../lib/smack-3.2.0.jar" excludes="META-INF/*" /> + <zipfileset src="../lib/smack-3.2.1.jar" excludes="META-INF/*" /> <manifest> <attribute name="Classpath" value="Essentials.jar"/> </manifest> diff --git a/EssentialsXMPP/nbproject/project.properties b/EssentialsXMPP/nbproject/project.properties index 802c76227..90aba36fa 100644 --- a/EssentialsXMPP/nbproject/project.properties +++ b/EssentialsXMPP/nbproject/project.properties @@ -64,7 +64,7 @@ dist.javadoc.dir=${dist.dir}/javadoc endorsed.classpath= excludes= file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar=../lib/bukkit-1.0.0-R1-SNAPSHOT.jar -file.reference.smack-3.2.0.jar=../lib/smack-3.2.0.jar +file.reference.smack-3.2.1.jar=../lib/smack-3.2.1.jar includes=** jar.archive.disabled=${jnlp.enabled} jar.compress=true @@ -72,7 +72,7 @@ jar.index=${jnlp.enabled} javac.classpath=\ ${reference.Essentials.jar}:\ ${file.reference.bukkit-1.0.0-R1-SNAPSHOT.jar}:\ - ${file.reference.smack-3.2.0.jar} + ${file.reference.smack-3.2.1.jar} # Space-separated list of extra javac options javac.compilerargs=-Xlint:unchecked javac.deprecation=false @@ -83,8 +83,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= diff --git a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java index 06575851d..56126e23b 100644 --- a/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java +++ b/EssentialsXMPP/src/com/earth2me/essentials/xmpp/EssentialsXMPP.java @@ -36,9 +36,14 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP final PluginManager pluginManager = getServer().getPluginManager(); ess = (IEssentials)pluginManager.getPlugin("Essentials"); - if (ess == null) + if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) { - LOGGER.log(Level.SEVERE, "Failed to load Essentials before EssentialsXMPP"); + LOGGER.log(Level.WARNING, _("versionMismatchAll")); + } + if (!ess.isEnabled()) + { + this.setEnabled(false); + return; } final EssentialsXMPPPlayerListener playerListener = new EssentialsXMPPPlayerListener(ess); @@ -52,17 +57,16 @@ public class EssentialsXMPP extends JavaPlugin implements IEssentialsXMPP ess.addReloadListener(users); ess.addReloadListener(xmpp); - if (!this.getDescription().getVersion().equals(ess.getDescription().getVersion())) - { - LOGGER.log(Level.WARNING, _("versionMismatchAll")); - } LOGGER.info(_("loadinfo", this.getDescription().getName(), this.getDescription().getVersion(), "essentials team")); } @Override public void onDisable() { - xmpp.disconnect(); + if (xmpp != null) + { + xmpp.disconnect(); + } } @Override |