Revert recent changes around player skulls using user cache
Dieser Commit ist enthalten in:
Ursprung
bf4b541513
Commit
e4d10c3cdf
@ -473,48 +473,6 @@ index b06bb3dccda23ebed1532e17f9699b9b6828d9d8..62ca208a95434ca1d8970b01f7291647
|
|||||||
public MinecraftSessionService getMinecraftSessionService() {
|
public MinecraftSessionService getMinecraftSessionService() {
|
||||||
return this.minecraftSessionService;
|
return this.minecraftSessionService;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
|
||||||
index 4fae1b3274a96b871b39de083e9b28ab6129533f..9a2efd38f28819355a271b9515ac98c3382c7383 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
|
||||||
@@ -161,6 +161,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
|
|
||||||
@@ -181,7 +182,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);
|
|
||||||
|
|
||||||
@@ -190,7 +200,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
|
diff --git a/src/main/java/net/minecraft/server/UserCache.java b/src/main/java/net/minecraft/server/UserCache.java
|
||||||
index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f7262546666e32883 100644
|
index 4f769211cf98c3da720a904da3dcdcd4c7611f0b..a038397028848edb4f43cd4f7262546666e32883 100644
|
||||||
--- a/src/main/java/net/minecraft/server/UserCache.java
|
--- a/src/main/java/net/minecraft/server/UserCache.java
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren