Fix NPE introduced in #17c30fd

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2023-10-22 20:36:35 -04:00
parent 0a971d438b
commit fa30894970

View File

@ -142,7 +142,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
// SPIGOT-6558: Set initial textures
tag.put(SKULL_OWNER.NBT, serializedProfile);
// Fill in textures
PlayerProfile ownerProfile = getOwnerProfile();
PlayerProfile ownerProfile = new CraftPlayerProfile(profile); // getOwnerProfile may return null
if (ownerProfile.getTextures().isEmpty()) {
ownerProfile.update().thenAccept((filledProfile) -> {
setOwnerProfile(filledProfile);