mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-07-23 14:03:43 +00:00
Test #304 set the location using the setters location, not the players location.
Support for offlline players
This commit is contained in:
parent
f58fa10686
commit
39770cd46d
2 changed files with 6 additions and 1 deletions
|
@ -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"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue