mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-02-28 18:21:23 +01:00
Fix sethome/seen for invalid players.
This commit is contained in:
parent
1fbed62c1d
commit
300ee9c729
@ -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 New Issue
Block a user