From 766793268140377140130d81f34a5fce85f205fd Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Sat, 22 Jun 2024 11:42:15 +1000 Subject: [PATCH] SPIGOT-7791: Skull BlockState with null profile causes NullPointerException By: md_5 --- .../src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java index 8edc23c8fb..9a94707f58 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java @@ -187,7 +187,7 @@ public class CraftSkull extends CraftBlockEntityState implement super.applyTo(skull); if (getSkullType() == SkullType.PLAYER) { - skull.setOwner(new ResolvableProfile(profile)); + skull.setOwner((profile != null) ? new ResolvableProfile(profile) : null); } }