From f0c49019dd14fe8c5731aae883ef8e3fe9a44733 Mon Sep 17 00:00:00 2001 From: KHobbits Date: Fri, 4 Nov 2011 23:13:21 +0000 Subject: [PATCH] Only pull/push data on valid player data. --- .../src/com/earth2me/essentials/EssentialsPlayerListener.java | 2 +- Essentials/src/com/earth2me/essentials/User.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 7a7ae4498..8ddc540ba 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -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); } diff --git a/Essentials/src/com/earth2me/essentials/User.java b/Essentials/src/com/earth2me/essentials/User.java index 973ffd401..2bbd32259 100644 --- a/Essentials/src/com/earth2me/essentials/User.java +++ b/Essentials/src/com/earth2me/essentials/User.java @@ -290,7 +290,7 @@ public class User extends UserData implements Comparable, IReplyTo, IUser @Override public String getDisplayName() { - if (ess.getSettings().changeDisplayName()) + if (!(base instanceof OfflinePlayer) && ess.getSettings().changeDisplayName()) { setDisplayNick(getNick()); }