Fixed "Last Seen" displaying Jan 1 1970 XX:59 for new registers

This commit is contained in:
Rsl1122 2018-02-10 11:26:13 +02:00
parent 723e8f7391
commit 8de5012ae5

View File

@ -177,8 +177,7 @@ public class PlayerProfile implements OfflinePlayer {
}
public long getLastSeen(Stream<Session> s) {
OptionalLong max = s.mapToLong(Session::getSessionEnd)
.max();
OptionalLong max = s.mapToLong(session -> Math.max(session.getSessionStart(), session.getSessionEnd())).max();
if (max.isPresent()) {
return max.getAsLong();
}