3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 02:50:09 +01:00

Fix username connecting with no texture being overwritten by usercache (#4970)

Dieser Commit ist enthalten in:
Camotoy 2021-03-01 16:06:05 -05:00 committet von GitHub
Ursprung df4c68b669
Commit 06900aef5e
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 10 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -46,4 +46,5 @@ ysl3000 <yannicklamprecht@live.de>
KennyTV <jahnke.nassim@gmail.com>
Machine_Maker <machine@machinemaker.me>
Ivan Pekov <ivan@mrivanplays.com>
Camotoy <20743703+Camotoy@users.noreply.github.com>
```

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..2751ce7f1556da07ef853807a588f096adf6ef7f
index 0000000000000000000000000000000000000000..6ae316109c8e35fbb6b0aebdee3075beb1445f1b
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
@@ -0,0 +1,297 @@
@@ -0,0 +1,301 @@
+package com.destroystokyo.paper.profile;
+
+import com.destroystokyo.paper.PaperConfig;
@ -179,9 +179,13 @@ index 0000000000000000000000000000000000000000..2751ce7f1556da07ef853807a588f096
+ if ((profile.getName() == null || !hasTextures()) && profile.getId() != null) {
+ GameProfile profile = userCache.getProfile(this.profile.getId());
+ if (profile != null) {
+ // if old has it, assume its newer, so overwrite, else use cached if it was set and ours wasn't
+ copyProfileProperties(this.profile, profile);
+ this.profile = profile;
+ if (this.profile.getName() == null) {
+ // if old has it, assume its newer, so overwrite, else use cached if it was set and ours wasn't
+ copyProfileProperties(this.profile, profile);
+ this.profile = profile;
+ } else {
+ copyProfileProperties(profile, this.profile);
+ }
+ }
+ }
+ return this.profile.isComplete();