diff options
Diffstat (limited to 'EssentialsSpawn/src')
-rw-r--r-- | EssentialsSpawn/src/com/earth2me/essentials/spawn/EssentialsSpawn.java | 13 |
1 files changed, 8 insertions, 5 deletions
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")); } |