diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 401619df0..f2b3be8d8 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -6,6 +6,7 @@ import java.util.Calendar; import java.util.GregorianCalendar; import java.util.logging.Logger; import org.bukkit.ChatColor; +import org.bukkit.Location; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; diff --git a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java index 690214b22..e07572f95 100644 --- a/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java +++ b/Essentials/src/com/earth2me/essentials/commands/Commandsethome.java @@ -26,7 +26,11 @@ public class Commandsethome extends EssentialsCommand if (user.isAuthorized("essentials.sethome.others")) { User usersHome = ess.getUser(ess.getServer().getPlayer(args[0])); - usersHome.setHome(args[1].equalsIgnoreCase("default")); + if(usersHome == null) + { + usersHome = ess.getOfflineUser(args[0]); + } + usersHome.setHome(user.getLocation(), args[1].equalsIgnoreCase("default")); } } }