diff --git a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java index 97ced232d..eb21aea39 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsPlayerListener.java @@ -129,7 +129,6 @@ public class EssentialsPlayerListener implements Listener user.setDisplayNick(); user.setLastLogin(System.currentTimeMillis()); - user.setLastLoginAddress(user.getAddress().getAddress().getHostAddress()); user.updateActivity(false); updateCompass(user); diff --git a/Essentials/src/com/earth2me/essentials/UserData.java b/Essentials/src/com/earth2me/essentials/UserData.java index 3c8066cc9..abf338470 100644 --- a/Essentials/src/com/earth2me/essentials/UserData.java +++ b/Essentials/src/com/earth2me/essentials/UserData.java @@ -621,10 +621,16 @@ public abstract class UserData extends PlayerExtension implements IConf return lastLogin; } - public void setLastLogin(long time) + private void _setLastLogin(long time) { lastLogin = time; config.setProperty("timestamps.login", time); + } + + public void setLastLogin(long time) + { + _setLastLogin(time); + _setLastLoginAddress(base.getAddress().getAddress().getHostAddress()); config.save(); } private long lastLogout; @@ -657,11 +663,10 @@ public abstract class UserData extends PlayerExtension implements IConf return lastLoginAddress; } - public void setLastLoginAddress(String address) + private void _setLastLoginAddress(String address) { lastLoginAddress = address; config.setProperty("ipAddress", address); - config.save(); } private boolean afk;