Don't add the jail if the world is null, also load the plugin after the

worlds have loaded.
This commit is contained in:
graywolf336 2013-12-16 12:39:08 -06:00
parent f33d6a0c45
commit 7b75c7a158
2 changed files with 193 additions and 191 deletions

View File

@ -237,7 +237,8 @@ public class JailIO {
}
}
pl.getJailManager().addJail(j, false);
if(pl.getServer().getWorld(j.getWorldName()) != null) pl.getJailManager().addJail(j, false);
else pl.getLogger().severe("Failed to load the jail " + j.getName() + " as the world '" + j.getWorldName() + "' does not exist (is null). Did you remove this world?");
break;
}
}

View File

@ -5,6 +5,7 @@ description: Ban too harsh? Kick/mute/whatever not enough? Jail bad players!
authors: [matejdro,multidude,graywolf336]
website: dev.bukkit.org/server-mods/jail/
softdepend: [Spout, WorldEdit, Vault, Notifications]
load: POSTWORLD
commands:
jailcreate:
description: Creates a new jail zone.