mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-09 20:41:23 +01: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
@ -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 New Issue
Block a user