Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[B+C] Update SkullMeta to use UUIDs. Adds BUKKIT-5614 #1080

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

meiskam
Copy link
Contributor

@meiskam meiskam commented Jul 2, 2014

The Issue:

SkullMeta.setOwner() does not populate the skull's GameProfile information

Justification for this PR:

It's not possible to spawn a skull item with a texture attached to it. Skull items can be worn on the head, and thus need their textures attached as soon as they exist.

PR Breakdown:

SkullMeta tracks a new key 'skull-owner-uuid'
CraftMetaSkull.setOwner(String) has been modified to call MinecraftSessionService.fillProfileProperties()
CraftMetaSkull.setOwner(UUID) has been added, which also calls MinecraftSessionService.fillProfileProperties()

The fillProfileProperties() function attaches all profile data, including textures, to the item.

(Note: This PR was originally by @TehRainbowGuy for Spigot, I've converted it for this project, and made some modifications.)

Relevant PR:

CB-1396 - Bukkit/CraftBukkit#1396

JIRA Ticket:

BUKKIT-5614 - https://bukkit.atlassian.net/browse/BUKKIT-5614

@turt2live turt2live self-assigned this Jul 22, 2014
@@ -22,12 +24,23 @@
boolean hasOwner();

/**
* Sets the owner of the skull.
* Sets the owner of the skull by UUID.
* <p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<p/>

Allows skull items to have their owner set by UUID as well as playername.  Changes setOwner() function to attach all profile properties to the skull, including textures.  Without this commit, spawned in skull items have the default texture instead of the texture of the owner.
@LB--
Copy link

LB-- commented Jul 24, 2014

Could getOwnerUniqueId() be added? Should setOwner(String) and getOwner() be deprecated? Should a more complex solution involving a new ShullOwnable interface be used?

@turt2live turt2live removed their assignment Feb 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants