diff options
author | Aikar <[email protected]> | 2020-06-28 05:03:22 -0400 |
---|---|---|
committer | Aikar <[email protected]> | 2020-06-28 05:03:22 -0400 |
commit | 5fc45f4db0ea9a1d0cf96be5d74990056e1c3883 (patch) | |
tree | e43c9786c981a4ecc5646aa6875a17cda50e4c82 | |
parent | a8ffecc741cd6aed770f7cce5309d0f6d2972e02 (diff) | |
download | Paper-5fc45f4db0ea9a1d0cf96be5d74990056e1c3883.tar.gz Paper-5fc45f4db0ea9a1d0cf96be5d74990056e1c3883.zip |
Revert recent changes around player skulls using user cache
Fixes #3637
-rw-r--r-- | Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch b/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch index df8c488a2d..65d31b903a 100644 --- a/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch +++ b/Spigot-Server-Patches/0154-Basic-PlayerProfile-API.patch @@ -466,48 +466,6 @@ index ed32242bd169e9f28607942aa31aa48a5799b215..54f80cb8e1b771f2a493543e04f8bc83 public MinecraftSessionService getMinecraftSessionService() { return this.minecraftSessionService; } -diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java -index 177cceb77f8783fe93ba7e4342de9c589f155c1b..83faa9dc5f74df4609cab34a66e4feed12990463 100644 ---- a/src/main/java/net/minecraft/server/TileEntitySkull.java -+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java -@@ -158,6 +158,7 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa - private void f() { - // Spigot start - GameProfile profile = this.gameProfile; -+ if (profile != null && profile.isComplete() && profile.getProperties().containsKey("textures")) return; // Paper - b(profile, new Predicate<GameProfile>() { - - @Override -@@ -178,7 +179,16 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa - } else if (MinecraftServer.getServer() == null) { - callback.apply(gameprofile); - } else { -- GameProfile profile = skinCache.getIfPresent(gameprofile.getName().toLowerCase(java.util.Locale.ROOT)); -+ // Paper start -+ com.destroystokyo.paper.profile.CraftPlayerProfile paperProfile = new com.destroystokyo.paper.profile.CraftPlayerProfile(gameprofile); -+ if (sync) { -+ // might complete by cache, but if not, go ahead and do it now, avoid the code below -+ paperProfile.complete(true, true); -+ } else { -+ paperProfile.completeFromCache(false, true); -+ } -+ GameProfile profile = paperProfile.getGameProfile(); -+ // Paper end - if (profile != null && Iterables.getFirst(profile.getProperties().get("textures"), (Object) null) != null) { - callback.apply(profile); - -@@ -187,7 +197,10 @@ public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Pa - Callable<GameProfile> callable = new Callable<GameProfile>() { - @Override - public GameProfile call() { -- final GameProfile profile = skinCache.getUnchecked(gameprofile.getName().toLowerCase(java.util.Locale.ROOT)); -+ // Paper start -+ paperProfile.complete(true, true); -+ final GameProfile profile = paperProfile.getGameProfile(); -+ // Paper end - MinecraftServer.getServer().processQueue.add(new Runnable() { - @Override - public void run() { diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java index 581199e6dcddb3692ccc6b6cf6c42fa5ef1f5e7e..39d2f83531d539fb96824c2e6a9018c12ea75272 100644 --- a/src/main/java/net/minecraft/server/UserCache.java |