mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 12:23:59 +00:00
Fixes to jail
This commit is contained in:
parent
ca3369938d
commit
69d3921a6a
2 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ public class Jail extends BlockListener implements IConf
|
||||||
|
|
||||||
public Location getJail(String jailName) throws Exception
|
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"));
|
throw new Exception(Util.i18n("jailNotExist"));
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class Commandtogglejail extends EssentialsCommand
|
||||||
return;
|
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());
|
sender.sendMessage("§cPerson is already in jail " + p.getJail());
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue