Prevented null playerUUID from executing code

Affects issues:
- Fixed #1307
This commit is contained in:
Rsl1122 2020-02-04 11:17:13 +02:00
parent 380c98e8e6
commit 5d457223f8

View File

@ -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);