Skip to content

Commit

Permalink
Update the skull_skin mech
Browse files Browse the repository at this point in the history
The code behind this changed, so we change with it.
  • Loading branch information
mcmonkey4eva committed Nov 13, 2014
1 parent 252bcbc commit edcb207
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/java/net/aufdemrand/denizen/objects/dLocation.java
Expand Up @@ -1453,13 +1453,15 @@ && getBlock().getState() instanceof CreatureSpawner) {
// @input Element
// @description
// Sets the skin of a skull block.
// Takes a name or UUID.
// Takes a username.
// @tags
// <l@location.skull_skin>
// -->
if (mechanism.matches("skull_skin") && getBlock().getState() instanceof Skull) {
((Skull)getBlock().getState()).setOwner(value.asString());
getBlock().getState().update(true);
Skull state = ((Skull)getBlock().getState());
if (!state.setOwner(value.asString()))
dB.echoError("Failed to set skull_skin!");
state.update(true);
}

if (!mechanism.fulfilled())
Expand Down

0 comments on commit edcb207

Please sign in to comment.