From 669631fec012b7ad75f9addfd1d10c513c47dcf4 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Mon, 4 Mar 2024 11:35:33 -0700 Subject: [PATCH] Catch null lastServerChange --- .../java/us/ajg0702/queue/common/ServerTimeManagerImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/ajg0702/queue/common/ServerTimeManagerImpl.java b/common/src/main/java/us/ajg0702/queue/common/ServerTimeManagerImpl.java index a5378f8b..e85555ab 100644 --- a/common/src/main/java/us/ajg0702/queue/common/ServerTimeManagerImpl.java +++ b/common/src/main/java/us/ajg0702/queue/common/ServerTimeManagerImpl.java @@ -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) {