[SPIGOT-7882] SkullMeta#getOwnerProfile requires profile's name to be non-null Created: 25/Aug/24  Updated: 25/Dec/24  Resolved: 30/Aug/24

Status: Resolved
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Oak Assignee: Doc
Resolution: Fixed Votes: 0
Labels: None

Version: 4226-Spigot-146439e-2889b3a 1.21-R0.1-SNAPSHOT
Guidelines Read: Yes

 Description   

If an item's SkullMeta has an owner profile but the profile's name is null, it returns null. This means that if a head is made without the name property the profile object cannot be collected.

For example, the https://minecraft-heads.com/ website does not provide the name property as shown in this code block and this head will return null when using SkullMeta#getOwnerProfile

 

/give @p minecraft:player_head[profile={id:[I;-1713734374,1097286524,-1815675771,-1473225903],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUyNDVjMGQwOGQ2YTk3ZGM5MWY4Nzg0NTY1NTQ1MTRlY2NhOTQ4ZGIxMGYyYzk0NzE4MGMxMzM1NTQ4NjI5In19fQ=="}]}] 1

 

Whereas if the name property is included in the profile the method will work:

/give @p player_head[profile={name:"HeadDB",id:[I;-1713734374,1097286524,-1815675771,-1473225903],properties:[{name:"textures",value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvOTUyNDVjMGQwOGQ2YTk3ZGM5MWY4Nzg0NTY1NTQ1MTRlY2NhOTQ4ZGIxMGYyYzk0NzE4MGMxMzM1NTQ4NjI5In19fQ=="}]}] 1


 Comments   
Comment by Doc [ 26/Aug/24 ]

Created PR: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/pull-requests/1467/overview

this allow the missing name behaviour for the meta and also fix a minor issue where the component for profile can add an unnecesary blank name

Comment by Oak [ 25/Aug/24 ]

I can confirm that the same functionality is ocuring as of 4300-Spigot-a759b62-7070de8

Comment by md_5 [ 25/Aug/24 ]

You're about 74 versions outdated, can you please try updating?

Comment by Oak [ 25/Aug/24 ]

Both commands with and without the name property give me a player head with a texture, they also save correctly on world save so I don't think it is a vanilla requirement unless I am misunderstanding

Comment by md_5 [ 25/Aug/24 ]

Pretty sure this is a vanilla requirement in recent versions

Generated at Tue Apr 08 01:20:45 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.