mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 20:29:20 +00:00
Merge branch 'refs/heads/master' into release
This commit is contained in:
commit
cc06117210
2 changed files with 12 additions and 2 deletions
|
@ -59,7 +59,12 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
||||||
{
|
{
|
||||||
throw new Exception(_("jailNotExist"));
|
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
|
finally
|
||||||
{
|
{
|
||||||
|
@ -111,7 +116,8 @@ public class Jails extends AsyncStorageObjectHolder<com.earth2me.essentials.sett
|
||||||
{
|
{
|
||||||
if (!(user.getBase() instanceof OfflinePlayer))
|
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);
|
user.setJail(jail);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,10 @@ public class Commandsetwarp extends EssentialsCommand
|
||||||
{
|
{
|
||||||
throw new NotEnoughArgumentsException();
|
throw new NotEnoughArgumentsException();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (args[0].matches("[0-9]+")) {
|
||||||
|
throw new NotEnoughArgumentsException();
|
||||||
|
}
|
||||||
|
|
||||||
final Location loc = user.getLocation();
|
final Location loc = user.getLocation();
|
||||||
ess.getWarps().setWarp(args[0], loc);
|
ess.getWarps().setWarp(args[0], loc);
|
||||||
|
|
Loading…
Reference in a new issue