Skip to content

Commit

Permalink
Catch null lastServerChange
Browse files Browse the repository at this point in the history
  • Loading branch information
ajgeiss0702 committed Mar 4, 2024
1 parent f9fd1da commit 669631f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ public class ServerTimeManagerImpl implements ServerTimeManager {
@Override
public long getLastServerChange(AdaptedPlayer player) {
if(player == null) return -1;
return serverSwitches.get(player.getUniqueId());
Long r = serverSwitches.get(player.getUniqueId());
return r == null ? -1 : r;
}

public void playerChanged(AdaptedPlayer player) {
Expand Down

0 comments on commit 669631f

Please sign in to comment.