SPIGOT-7791: Skull BlockState with null profile causes NullPointerException

This commit is contained in:
md_5 2024-06-22 11:42:15 +10:00
parent 5e46f1c821
commit 820084b5f6
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -187,7 +187,7 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
super.applyTo(skull); super.applyTo(skull);
if (getSkullType() == SkullType.PLAYER) { if (getSkullType() == SkullType.PLAYER) {
skull.setOwner(new ResolvableProfile(profile)); skull.setOwner((profile != null) ? new ResolvableProfile(profile) : null);
} }
} }