diff options
author | Aikar <[email protected]> | 2020-06-25 04:01:28 -0400 |
---|---|---|
committer | Aikar <[email protected]> | 2020-06-25 04:01:28 -0400 |
commit | a8ffecc741cd6aed770f7cce5309d0f6d2972e02 (patch) | |
tree | 37aa3ccd218d017b16a4c3768444ae319dc0c0ac | |
parent | ec9fa36908090f19f99bcd326cec856245c887dd (diff) | |
download | Paper-a8ffecc741cd6aed770f7cce5309d0f6d2972e02.tar.gz Paper-a8ffecc741cd6aed770f7cce5309d0f6d2972e02.zip |
Fix NPE and uuid lookup for player skulls
Fixes #3610
Fixes #3611
-rw-r--r-- | Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch index 6202101695..df8c488a2d 100644 --- a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch @@ -7,10 +7,10 @@ Establishes base extension of profile systems for future edits too diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java new file mode 100644 -index 0000000000000000000000000000000000000000..00b7630ccb2be7a78ab5471c8e8bdcd5a92209a0 +index 0000000000000000000000000000000000000000..d73de9eb89c4e3a748907f2da21a3072cc6b7f41 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java -@@ -0,0 +1,294 @@ +@@ -0,0 +1,296 @@ +package com.destroystokyo.paper.profile; + +import com.destroystokyo.paper.PaperConfig; @@ -194,13 +194,15 @@ index 0000000000000000000000000000000000000000..00b7630ccb2be7a78ab5471c8e8bdcd5 + 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()); + } |