Skip to content

Commit

Permalink
Add npc.skin_blob tag, fixes #1164
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Oct 31, 2015
1 parent d21226f commit 5ccf1b9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/java/net/aufdemrand/denizen/objects/dNPC.java
Expand Up @@ -718,6 +718,17 @@ && getCitizen().getTrait(ConstantsTrait.class).getConstant(attribute.getContext(
if (attribute.startsWith("has_skin"))
return new Element(getCitizen().data().has(NPC.PLAYER_SKIN_UUID_METADATA)).getAttribute(attribute.fulfill(1));

// <--[tag]
// @attribute <n@npc.skin_blob>
// @returns Element
// @description
// returns the NPC's custom skin blob, if any.
// -->
if (attribute.startsWith("skin_blob")) {
if (getCitizen().data().has(NPC.PLAYER_SKIN_TEXTURE_PROPERTIES_METADATA))
return new Element(getCitizen().data().get(NPC.PLAYER_SKIN_TEXTURE_PROPERTIES_METADATA).toString()).getAttribute(attribute.fulfill(1));
}

// <--[tag]
// @attribute <n@npc.skin>
// @returns Element
Expand Down

0 comments on commit 5ccf1b9

Please sign in to comment.