mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-02-12 04:20:41 +00:00
Fix sethome/seen for invalid players.
This commit is contained in:
parent
1fbed62c1d
commit
300ee9c729
2 changed files with 5 additions and 1 deletions
|
@ -30,7 +30,7 @@ public class Commandseen extends EssentialsCommand
|
|||
User u = ess.getOfflineUser(args[0]);
|
||||
if (u == null)
|
||||
{
|
||||
return;
|
||||
throw new Exception(Util.i18n("playerNotFound"));
|
||||
}
|
||||
sender.sendMessage(Util.format("seenOffline", u.getDisplayName(), Util.formatDateDiff(u.getLastLogout())));
|
||||
}
|
||||
|
|
|
@ -30,6 +30,10 @@ public class Commandsethome extends EssentialsCommand
|
|||
{
|
||||
usersHome = ess.getOfflineUser(args[0]);
|
||||
}
|
||||
if (usersHome == null)
|
||||
{
|
||||
throw new Exception(Util.i18n("playerNotFound"));
|
||||
}
|
||||
usersHome.setHome(user.getLocation(), args[1].equalsIgnoreCase("default"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue