From 5d457223f8e066a47aa626d97018c843ccebb15e Mon Sep 17 00:00:00 2001 From: Rsl1122 <24460436+Rsl1122@users.noreply.github.com> Date: Tue, 4 Feb 2020 11:17:13 +0200 Subject: [PATCH] Prevented null playerUUID from executing code Affects issues: - Fixed #1307 --- .../plan/gathering/listeners/nukkit/PlayerOnlineListener.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Plan/nukkit/src/main/java/com/djrapitops/plan/gathering/listeners/nukkit/PlayerOnlineListener.java b/Plan/nukkit/src/main/java/com/djrapitops/plan/gathering/listeners/nukkit/PlayerOnlineListener.java index a8c5c3fa0..e7e02fc17 100644 --- a/Plan/nukkit/src/main/java/com/djrapitops/plan/gathering/listeners/nukkit/PlayerOnlineListener.java +++ b/Plan/nukkit/src/main/java/com/djrapitops/plan/gathering/listeners/nukkit/PlayerOnlineListener.java @@ -211,6 +211,8 @@ public class PlayerOnlineListener implements Listener { Player player = event.getPlayer(); String playerName = player.getName(); UUID playerUUID = player.getUniqueId(); + if (playerUUID == null) return; // Can be null when player is not signed in to xbox live + UUID serverUUID = serverInfo.getServerUUID(); JSONCache.invalidate(DataID.SERVER_OVERVIEW, serverUUID); JSONCache.invalidate(DataID.GRAPH_PERFORMANCE, serverUUID);