From 2143a948be00e2b456db926b3f15142858039c90 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Thu, 1 Jul 2021 00:10:28 +0100 Subject: [PATCH] Fix NPE when completing skull lookups without a real owner (Fixes #6052) This looks like mojang introduced an NPE however it was previously being supressed by the future used by the server, we'll just stick to the legacy behavior of retainining the existing profile of earlier versions --- ...Don-t-complete-skull-lookups-on-main-thread-MC-22743.patch | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/patches/server/Don-t-complete-skull-lookups-on-main-thread-MC-22743.patch b/patches/server/Don-t-complete-skull-lookups-on-main-thread-MC-22743.patch index fc7a21a7d..4ea670d16 100644 --- a/patches/server/Don-t-complete-skull-lookups-on-main-thread-MC-22743.patch +++ b/patches/server/Don-t-complete-skull-lookups-on-main-thread-MC-22743.patch @@ -15,6 +15,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 - SkullBlockEntity.profileCache.getAsync(owner.getName(), (gameprofile1) -> { + // Paper start + SkullBlockEntity.profileCache.getAsync(owner.getName(), (gameprofile) -> { ++ if (gameprofile == null) { ++ net.minecraft.server.MinecraftServer.getServer().scheduleOnMain(() -> callback.accept(owner)); ++ return; ++ } + Runnable runnable = () -> { + GameProfile gameprofile1 = gameprofile; Property property = (Property) Iterables.getFirst(gameprofile1.getProperties().get("textures"), (Object) null);