3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 11:30:06 +01:00

Fix NPE and uuid lookup for player skulls

Fixes #3610
Fixes #3611
Dieser Commit ist enthalten in:
Aikar 2020-06-25 04:01:28 -04:00
Ursprung ec9fa36908
Commit a8ffecc741
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 401ADFC9891FAAFE

Datei anzeigen

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