Yatopia/patches/server/0056-PaperPR-Fix-username-connecting-with-no-texture-bein.patch
Simon Gardling d059af01b6
Updated Upstream and Sidestream(s) (Paper/Purpur/AirplaneLite) (#362)
* Updated Upstream and Sidestream(s) (Paper/Purpur/AirplaneLite)

Upstream/An Sidestream has released updates that appears to apply and compile correctly
This update has NOT been tested by YatopiaMC and as with ANY update, please do your own testing.

Paper Changes:
fc4c0bc42 Reset shield blocking on dimension change
1c8b6065e Skip distance map update when spawning is disabled
091e6700f Added PlayerStonecutterRecipeSelectEvent
fc885f966 Add toggle for always placing the dragon egg
b3a6da3a7 Updated Upstream (Bukkit/CraftBukkit)
18ccc062d [Auto] Updated Upstream (Spigot)

Purpur Changes:
df9bd08 Config to use infinity bows without arrows (#149)
9d537bc Fix PlayerEditBookEvent not saving new book
3f8816d [ci-skip] Oops
5508728 [ci-skip] Add granny to funding
4c7ab70 Updated Upstream (Paper)
5eefb52 [ci-skip] Update Gradle to 6.8.1

AirplaneLite Changes:
459bb20 Remove patch
515fec7 Remove streams
fc94d7b Correct launcher name
0b153bd Update gradle version

* add Remove-streams.patch from AirplaneLite
2021-01-25 13:22:51 -06:00

28 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Camotoy <20743703+Camotoy@users.noreply.github.com>
Date: Mon, 4 Jan 2021 10:45:49 +0200
Subject: [PATCH] PaperPR - Fix username connecting with no texture being
overwritten by usercache
diff --git a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
index 8bda2180576d3c58ad592e6158621160a8c4c5cf..44132e902b653b07b21fd01d13a88870290af439 100644
--- a/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
+++ b/src/main/java/com/destroystokyo/paper/profile/CraftPlayerProfile.java
@@ -166,9 +166,15 @@ public class CraftPlayerProfile implements PlayerProfile {
if ((profile.getName() == null || !hasTextures()) && profile.getId() != null) {
GameProfile profile = userCache.getProfile(this.profile.getId());
if (profile != null) {
+ // Yatopia start - fix username connecting with no texture being overwritten by user cache
+ 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);
+ }
+ // Yatopia end
}
}
return this.profile.isComplete();