Fix username connecting with no texture being overwritten by usercache (#4970)
This commit is contained in:
@ -46,4 +46,5 @@ ysl3000 <yannicklamprecht@live.de>
|
|||||||
Nassim Jahnke <nassim@njahnke.dev>
|
Nassim Jahnke <nassim@njahnke.dev>
|
||||||
Machine_Maker <machine@machinemaker.me>
|
Machine_Maker <machine@machinemaker.me>
|
||||||
Ivan Pekov <ivan@mrivanplays.com>
|
Ivan Pekov <ivan@mrivanplays.com>
|
||||||
|
Camotoy <20743703+Camotoy@users.noreply.github.com>
|
||||||
```
|
```
|
||||||
|
|||||||
@ -179,9 +179,13 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ if ((profile.getName() == null || !hasTextures()) && profile.getId() != null) {
|
+ if ((profile.getName() == null || !hasTextures()) && profile.getId() != null) {
|
||||||
+ GameProfile profile = userCache.getProfile(this.profile.getId());
|
+ GameProfile profile = userCache.getProfile(this.profile.getId());
|
||||||
+ if (profile != null) {
|
+ if (profile != null) {
|
||||||
+ // if old has it, assume its newer, so overwrite, else use cached if it was set and ours wasn't
|
+ if (this.profile.getName() == null) {
|
||||||
+ copyProfileProperties(this.profile, profile);
|
+ // if old has it, assume its newer, so overwrite, else use cached if it was set and ours wasn't
|
||||||
+ this.profile = profile;
|
+ copyProfileProperties(this.profile, profile);
|
||||||
|
+ this.profile = profile;
|
||||||
|
+ } else {
|
||||||
|
+ copyProfileProperties(profile, this.profile);
|
||||||
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ return this.profile.isComplete();
|
+ return this.profile.isComplete();
|
||||||
|
|||||||
Reference in New Issue
Block a user