From d056b9e43688a7dc03e2491760499fa2897fa141 Mon Sep 17 00:00:00 2001 From: snowleo Date: Tue, 16 Oct 2012 21:12:29 +0200 Subject: [PATCH] Fix /seen for offline users --- Essentials/src/net/ess3/commands/Commandseen.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Essentials/src/net/ess3/commands/Commandseen.java b/Essentials/src/net/ess3/commands/Commandseen.java index 121b5e735..58954c89e 100644 --- a/Essentials/src/net/ess3/commands/Commandseen.java +++ b/Essentials/src/net/ess3/commands/Commandseen.java @@ -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")));