Only pull/push data on valid player data.

This commit is contained in:
KHobbits 2011-11-04 23:13:21 +00:00
parent 05242a7e8f
commit f0c49019dd
2 changed files with 2 additions and 2 deletions

View File

@ -168,6 +168,7 @@ public class EssentialsPlayerListener extends PlayerListener
{
user.setDisplayNick(user.getNick());
}
user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress());
user.updateActivity(false);
if (user.isAuthorized("essentials.sleepingignored"))
{
@ -231,7 +232,6 @@ public class EssentialsPlayerListener extends PlayerListener
event.allow();
user.setLastLogin(System.currentTimeMillis());
user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress());
updateCompass(user);
}

View File

@ -290,7 +290,7 @@ public class User extends UserData implements Comparable<User>, IReplyTo, IUser
@Override
public String getDisplayName()
{
if (ess.getSettings().changeDisplayName())
if (!(base instanceof OfflinePlayer) && ess.getSettings().changeDisplayName())
{
setDisplayNick(getNick());
}