mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-04 23:48:31 +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);
|
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
|
||||||
throw new NoChargeException();
|
throw new NoChargeException();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new Exception(_("bedmissing"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
goHome(user, player, homeName.toLowerCase(Locale.ENGLISH), charge);
|
goHome(user, player, homeName.toLowerCase(Locale.ENGLISH), charge);
|
||||||
}
|
}
|
||||||
@ -73,9 +77,16 @@ public class Commandhome extends EssentialsCommand
|
|||||||
}
|
}
|
||||||
else
|
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)));
|
user.sendMessage(_("homes", Util.joinList(homes)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user