Fix NPE and uuid lookup for player skulls

Fixes #3610
Fixes #3611
This commit is contained in:
Aikar 2020-06-25 04:01:28 -04:00
parent 48473fe003
commit 3c8c5ed111

View file

@ -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());
+ }