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:
@@ -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")));
|
||||||
|
Reference in New Issue
Block a user