mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-11 20:00:46 +00:00
try improve bed spawn handle
dont act as if bed doesnt exist if its missing
This commit is contained in:
parent
911224dc64
commit
2a816cef7b
1 changed files with 13 additions and 2 deletions
|
@ -52,6 +52,10 @@ public class Commandhome extends EssentialsCommand
|
|||
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
|
||||
throw new NoChargeException();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new Exception(_("bedmissing"));
|
||||
}
|
||||
}
|
||||
goHome(user, player, homeName.toLowerCase(Locale.ENGLISH), charge);
|
||||
}
|
||||
|
@ -73,9 +77,16 @@ public class Commandhome extends EssentialsCommand
|
|||
}
|
||||
else
|
||||
{
|
||||
if (bed != null && user.isAuthorized("essentials.home.bed"))
|
||||
if (user.isAuthorized("essentials.home.bed"))
|
||||
{
|
||||
homes.add(_("bed"));
|
||||
if (bed != null)
|
||||
{
|
||||
homes.add(_("bed"));
|
||||
}
|
||||
else
|
||||
{
|
||||
homes.add(_("bednull"));
|
||||
}
|
||||
}
|
||||
user.sendMessage(_("homes", Util.joinList(homes)));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue