1
0
mirror of https://github.com/essentials/Essentials.git synced 2025-08-16 03:24:31 +02:00

Fix NPE in UserData on login

if no address is available
This commit is contained in:
Alexander Schepp
2012-10-21 23:17:08 +03:00
parent 411a4cc7ee
commit 2a227a6400

View File

@@ -635,7 +635,10 @@ public abstract class UserData extends PlayerExtension implements IConf
public void setLastLogin(long time)
{
_setLastLogin(time);
_setLastLoginAddress(base.getAddress().getAddress().getHostAddress());
if (base.getAddress() != null && base.getAddress().getAddress() != null)
{
_setLastLoginAddress(base.getAddress().getAddress().getHostAddress());
}
config.save();
}
private long lastLogout;