1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-19 13:01:20 +02:00

Fix NPE in /seen

This commit is contained in:
snowleo
2012-10-03 13:32:42 +02:00
parent 4341aac086
commit 4105ea4878

View File

@@ -38,11 +38,11 @@ public class Commandseen extends EssentialsCommand
{
@Cleanup
IUser u = ess.getUserMap().getUser(args[0]);
u.acquireReadLock();
if (u == null)
{
throw new Exception(_("playerNotFound"));
}
u.acquireReadLock();
sender.sendMessage(_("seenOffline", u.getPlayer().getDisplayName(), DateUtil.formatDateDiff(u.getTimestamp(TimestampType.LOGOUT))));
if (u.isBanned())
{