mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-07 07:06:41 +02:00
Merge branch 'master' of github.com:essentials/Essentials
This commit is contained in:
@@ -59,7 +59,12 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
||||
{
|
||||
throw new Exception(_("jailNotExist"));
|
||||
}
|
||||
return getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
|
||||
Location loc = getData().getJails().get(jailName.toLowerCase(Locale.ENGLISH));
|
||||
if (loc == null || loc.getWorld() == null)
|
||||
{
|
||||
throw new Exception(_("jailNotExist"));
|
||||
}
|
||||
return loc;
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -111,7 +116,8 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
||||
{
|
||||
if (!(user.getBase() instanceof OfflinePlayer))
|
||||
{
|
||||
user.getTeleport().now(getJail(jail), false, TeleportCause.COMMAND);
|
||||
Location loc = getJail(jail);
|
||||
user.getTeleport().now(loc, false, TeleportCause.COMMAND);
|
||||
}
|
||||
user.setJail(jail);
|
||||
}
|
||||
|
Reference in New Issue
Block a user