From 3c8c5ed111e7a557ff0c6a17af5a44d1cefee870 Mon Sep 17 00:00:00 2001 From: Aikar Date: Thu, 25 Jun 2020 04:01:28 -0400 Subject: [PATCH] Fix NPE and uuid lookup for player skulls Fixes #3610 Fixes #3611 --- Spigot-Server-Patches/Basic-PlayerProfile-API.patch | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch index a15cdbb8d..15df7c9ed 100644 --- a/Spigot-Server-Patches/Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/Basic-PlayerProfile-API.patch @@ -194,13 +194,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public boolean complete(boolean textures, boolean onlineMode) { + MinecraftServer server = MinecraftServer.getServer(); + -+ boolean isCompleteFromCache = this.completeFromCache(false, onlineMode); ++ boolean isCompleteFromCache = this.completeFromCache(true, onlineMode); + if (onlineMode && (!isCompleteFromCache || textures && !hasTextures())) { + GameProfile result = server.getSessionService().fillProfileProperties(profile, true); + if (result != null) { + copyProfileProperties(result, this.profile, true); + } -+ server.getUserCache().saveProfile(this.profile); ++ if (this.profile.isComplete()) { ++ server.getUserCache().saveProfile(this.profile); ++ } + } + return profile.isComplete() && (!onlineMode || !textures || hasTextures()); + }