mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-18 04:21:31 +02:00
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.
This commit is contained in:
@@ -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"));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user