summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKHobbits <rob@khobbits.co.uk>2011-11-04 23:13:21 +0000
committerKHobbits <rob@khobbits.co.uk>2011-11-04 23:13:21 +0000
commitf0c49019dd14fe8c5731aae883ef8e3fe9a44733 (patch)
treecab473377d88f82fd876b45fe1989b912e490880
parent05242a7e8fe491219798473f5e4dca69a9a4b546 (diff)
downloadEssentials-f0c49019dd14fe8c5731aae883ef8e3fe9a44733.tar
Essentials-f0c49019dd14fe8c5731aae883ef8e3fe9a44733.tar.gz
Essentials-f0c49019dd14fe8c5731aae883ef8e3fe9a44733.tar.lz
Essentials-f0c49019dd14fe8c5731aae883ef8e3fe9a44733.tar.xz
Essentials-f0c49019dd14fe8c5731aae883ef8e3fe9a44733.zip
Only pull/push data on valid player data.
-rw-r--r--Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java2
-rw-r--r--Essentials/src/com/earth2me/essentials/User.java2
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<User>, IReplyTo, IUser
@Override
public String getDisplayName()
{
- if (ess.getSettings().changeDisplayName())
+ if (!(base instanceof OfflinePlayer) && ess.getSettings().changeDisplayName())
{
setDisplayNick(getNick());
}