diff options
author | snowleo <schneeleo@gmail.com> | 2011-12-07 15:18:50 +0100 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2011-12-07 15:18:50 +0100 |
commit | 46c99e5c6f34e6af9a7be588b9b7fa1341b4d0ea (patch) | |
tree | 95a12c1adcf63daad47d775454fa1318bb047b07 | |
parent | 02b25120e89194203103a3e02d4c0a116b90e8b5 (diff) | |
download | Essentials-46c99e5c6f34e6af9a7be588b9b7fa1341b4d0ea.tar Essentials-46c99e5c6f34e6af9a7be588b9b7fa1341b4d0ea.tar.gz Essentials-46c99e5c6f34e6af9a7be588b9b7fa1341b4d0ea.tar.lz Essentials-46c99e5c6f34e6af9a7be588b9b7fa1341b4d0ea.tar.xz Essentials-46c99e5c6f34e6af9a7be588b9b7fa1341b4d0ea.zip |
/home sends the player to bed again before it tries to respawn.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandhome.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index 222d49017..d1db6c523 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -60,7 +60,14 @@ public class Commandhome extends EssentialsCommand final List<String> homes = player.getHomes(); 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); + return; } else if (homes.isEmpty()) { @@ -69,6 +76,7 @@ public class Commandhome extends EssentialsCommand else if (homes.size() == 1 && player.equals(user)) { user.getTeleport().home(player, homes.get(0), charge); + return; } else { |