mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-29 11:31:55 +01:00
Fixes to jail
This commit is contained in:
parent
ca3369938d
commit
69d3921a6a
@ -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"));
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user