diff options
author | KHobbits <rob@khobbits.co.uk> | 2012-03-25 17:27:06 +0100 |
---|---|---|
committer | KHobbits <rob@khobbits.co.uk> | 2012-03-25 17:27:06 +0100 |
commit | 21a47bbac8e892d6ffff13db9cc3360546ee140f (patch) | |
tree | df3d3f605e548a6b9c36c2a4de2547871f88b39a | |
parent | 4f5e66925184cd4005d194766433e1b5e0a8e1a0 (diff) | |
download | Essentials-21a47bbac8e892d6ffff13db9cc3360546ee140f.tar Essentials-21a47bbac8e892d6ffff13db9cc3360546ee140f.tar.gz Essentials-21a47bbac8e892d6ffff13db9cc3360546ee140f.tar.lz Essentials-21a47bbac8e892d6ffff13db9cc3360546ee140f.tar.xz Essentials-21a47bbac8e892d6ffff13db9cc3360546ee140f.zip |
Reorder login/join event calls.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index b45e1fb10..6b6b4a034 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -126,9 +126,13 @@ public class EssentialsPlayerListener implements Listener { ess.getBackup().onPlayerJoin(); final User user = ess.getUser(event.getPlayer()); + user.setDisplayNick(); + user.setLastLogin(System.currentTimeMillis()); user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress()); + user.updateActivity(false); + updateCompass(user); if (user.isAuthorized("essentials.sleepingignored")) { user.setSleepingIgnored(true); @@ -184,7 +188,10 @@ public class EssentialsPlayerListener implements Listener } User user = ess.getUser(event.getPlayer()); - user.setNPC(false); + if (user.isNPC()) + { + user.setNPC(false); + } final long currentTime = System.currentTimeMillis(); final boolean banExpired = user.checkBanTimeout(currentTime); @@ -204,9 +211,6 @@ public class EssentialsPlayerListener implements Listener return; } event.allow(); - - user.setLastLogin(System.currentTimeMillis()); - updateCompass(user); } private void updateCompass(final User user) |