Don't allow jailing in unloaded worlds and don't allow joining while
jailed in unloaded worlds.
This commit is contained in:
@ -174,6 +174,11 @@ public class JailCommand implements Command {
|
||||
|
||||
//Get the jail instance from the name of jail in the params.
|
||||
Jail j = jm.getJail(jailName);
|
||||
if(!j.isEnabled()) {
|
||||
sender.sendMessage(jm.getPlugin().getJailIO().getLanguageString(LangString.WORLDUNLOADED, j.getName()));
|
||||
return true;
|
||||
}
|
||||
|
||||
Cell c = j.getCell(params.getCell());
|
||||
Prisoner pris = new Prisoner(uuid, params.getPlayer(), muted, time, sender.getName(), reason);
|
||||
|
||||
|
@ -32,7 +32,8 @@ public class JailListCommand implements Command {
|
||||
if(args.length == 1) {
|
||||
//No jail provided, so give them a list of the jails
|
||||
for(Jail j : jm.getJails()) {
|
||||
sender.sendMessage(ChatColor.BLUE + " " + j.getName() + " (" + j.getAllPrisoners().size() + ")");
|
||||
if(j.isEnabled()) sender.sendMessage(ChatColor.BLUE + " " + j.getName() + " (" + j.getAllPrisoners().size() + ")");
|
||||
else sender.sendMessage(ChatColor.RED + " " + j.getName() + " (" + j.getAllPrisoners().size() + ") - WORLD UNLOADED");
|
||||
}
|
||||
}else {
|
||||
Jail j = jm.getJail(args[1]);
|
||||
|
Reference in New Issue
Block a user