-
Type:
New Feature
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
The SkullMeta class hasn't been updated for years and now has two flaws:
- Getter and setter for the skull owner still use player name instead of UUID.
- There is no way to access the texture of the skull.
This is the NBT tag of an example player head item (generated using this website):
{display:{Name:"Notch Head"},SkullOwner:{Id:"d220a6b0-d62b-4112-96d6-a1b1846d275a",Properties:{textures:[{Value:"eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvYTExNmU2OWE4NDVlMjI3ZjdjYTFmZGRlOGMzNTdjOGM4MjFlYmQ0YmE2MTkzODJlYTRhMWY4N2Q0YWU5NCJ9fX0="}]}}}
My suggestions:
1) Add a method boolean setOwner(UUID owner)
This method would change the SkullOwner's UUID.
2) Add a method UUID getOwner()
This method would return the SkullOwner's UUID.
3) Add a method boolean setTexture(String texture)
The method would put the texture parameter into the NBT tag's Value field and change the SkullOwner UUID to a new random one.
4) Add a method String getTexture()
This method would return the current texture of the player head.
5) Deprecate boolean setOwner(String owner) and String getOwner()
These changes would make player skulls namechange-proof and would allow modifying a skull's texture without the texture being used as skin by a Minecraft account.
Additionally, the Skull block state class could get methods similar to 3) and 4).