1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-30 01:39:51 +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) catch (PlayerNotFoundException e)
{ {
IUser u = ess.getUserMap().getUser(args[0]); IUser u = ess.getUserMap().matchUser(args[0], true);
if (u == null) sender.sendMessage(_("seenOffline", u.getName(), DateUtil.formatDateDiff(u.getTimestamp(TimestampType.LOGOUT))));
{
throw new Exception(_("playerNotFound"));
}
sender.sendMessage(_("seenOffline", u.getPlayer().getDisplayName(), DateUtil.formatDateDiff(u.getTimestamp(TimestampType.LOGOUT))));
if (u.isBanned()) if (u.isBanned())
{ {
sender.sendMessage(_("whoisBanned", show ? u.getData().getBan().getReason() : _("true"))); sender.sendMessage(_("whoisBanned", show ? u.getData().getBan().getReason() : _("true")));