mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-08-05 12:02:53 +00:00
/home sends the player to bed again before it tries to respawn.
This commit is contained in:
parent
02b25120e8
commit
46c99e5c6f
1 changed files with 8 additions and 0 deletions
|
@ -60,7 +60,14 @@ public class Commandhome extends EssentialsCommand
|
||||||
final List<String> homes = player.getHomes();
|
final List<String> homes = player.getHomes();
|
||||||
if (homes.isEmpty() && player.equals(user))
|
if (homes.isEmpty() && player.equals(user))
|
||||||
{
|
{
|
||||||
|
final Location bed = player.getBedSpawnLocation();
|
||||||
|
if (bed != null)
|
||||||
|
{
|
||||||
|
user.getTeleport().teleport(bed, charge, TeleportCause.COMMAND);
|
||||||
|
return;
|
||||||
|
}
|
||||||
user.getTeleport().respawn(charge, TeleportCause.COMMAND);
|
user.getTeleport().respawn(charge, TeleportCause.COMMAND);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else if (homes.isEmpty())
|
else if (homes.isEmpty())
|
||||||
{
|
{
|
||||||
|
@ -69,6 +76,7 @@ public class Commandhome extends EssentialsCommand
|
||||||
else if (homes.size() == 1 && player.equals(user))
|
else if (homes.size() == 1 && player.equals(user))
|
||||||
{
|
{
|
||||||
user.getTeleport().home(player, homes.get(0), charge);
|
user.getTeleport().home(player, homes.get(0), charge);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue