diff options
-rw-r--r-- | Essentials/src/com/earth2me/essentials/commands/Commandhome.java | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java index 2ee2661e6..16b9fca2a 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandhome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandhome.java @@ -45,17 +45,17 @@ public class Commandhome extends EssentialsCommand catch (NotEnoughArgumentsException e) { List<String> homes = u.getHomes(); - if (homes.isEmpty()) + if (homes.isEmpty() && u.equals(user) && ess.getSettings().spawnIfNoHome()) { - throw new Exception(u == user ? Util.i18n("noHomeSet") : Util.i18n("noHomeSetPlayer")); + user.getTeleport().respawn(ess.getSpawn(), charge); } - else if ((homes.size() == 1) && u == user) + else if (homes.isEmpty()) { - user.getTeleport().home(u, homes.get(0), charge); + throw new Exception(u == user ? Util.i18n("noHomeSet") : Util.i18n("noHomeSetPlayer")); } - else if (ess.getSettings().spawnIfNoHome()) + else if (homes.size() == 1 && u.equals(user)) { - user.getTeleport().respawn(ess.getSpawn(), charge); + user.getTeleport().home(u, homes.get(0), charge); } else { |