1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-29 17:29:56 +02:00

Fix /seen for offline users

This commit is contained in:
snowleo
2012-10-16 21:12:29 +02:00
parent c412a22502
commit d056b9e436

View File

@@ -35,12 +35,8 @@ public class Commandseen extends EssentialsCommand
}
catch (PlayerNotFoundException e)
{
IUser u = ess.getUserMap().getUser(args[0]);
if (u == null)
{
throw new Exception(_("playerNotFound"));
}
sender.sendMessage(_("seenOffline", u.getPlayer().getDisplayName(), DateUtil.formatDateDiff(u.getTimestamp(TimestampType.LOGOUT))));
IUser u = ess.getUserMap().matchUser(args[0], true);
sender.sendMessage(_("seenOffline", u.getName(), DateUtil.formatDateDiff(u.getTimestamp(TimestampType.LOGOUT))));
if (u.isBanned())
{
sender.sendMessage(_("whoisBanned", show ? u.getData().getBan().getReason() : _("true")));