diff options
author | snowleo <schneeleo@gmail.com> | 2011-08-08 16:42:56 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-08-08 16:42:56 +0200 |
commit | 69d3921a6ae566455387bf39a7de648d0c823c6a (patch) | |
tree | 081b8d5624f2f39d7e156031cc9b2e4d420368f7 | |
parent | ca3369938d07f5f8f82b48a37e2326d2a52458f8 (diff) | |
download | Essentials-69d3921a6ae566455387bf39a7de648d0c823c6a.tar Essentials-69d3921a6ae566455387bf39a7de648d0c823c6a.tar.gz Essentials-69d3921a6ae566455387bf39a7de648d0c823c6a.tar.lz Essentials-69d3921a6ae566455387bf39a7de648d0c823c6a.tar.xz Essentials-69d3921a6ae566455387bf39a7de648d0c823c6a.zip |
Fixes to jail
-rw-r--r-- | Essentials/src/com/earth2me/essentials/Jail.java | 2 | ||||
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Jail.java b/Essentials/src/com/earth2me/essentials/Jail.java index fdc184055..ff3bec2f7 100644 --- a/Essentials/src/com/earth2me/essentials/Jail.java +++ b/Essentials/src/com/earth2me/essentials/Jail.java @@ -31,7 +31,7 @@ public class Jail extends BlockListener implements IConf public Location getJail(String jailName) throws Exception { - if (config.getProperty(jailName.toLowerCase()) == null) + if (jailName == null || config.getProperty(jailName.toLowerCase()) == null) { throw new Exception(Util.i18n("jailNotExist")); } diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java index 3312dafc0..5fafe3374 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandtogglejail.java @@ -71,7 +71,7 @@ public class Commandtogglejail extends EssentialsCommand return; } - if (args.length == 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.getJail())) + if (args.length >= 2 && p.isJailed() && !args[1].equalsIgnoreCase(p.getJail())) { sender.sendMessage("§cPerson is already in jail " + p.getJail()); return; |