Skip to content

Commit

Permalink
Add backup trick for skull_name
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 9, 2017
1 parent c290f9f commit 89ad6eb
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -737,7 +737,11 @@ else if (type == Material.TRAP_DOOR
BlockState blockState = getBlock().getState();
if (blockState instanceof Skull) {
PlayerProfile profile = NMSHandler.getInstance().getBlockHelper().getPlayerProfile((Skull) blockState);
return new Element(profile.getName()).getAttribute(attribute);
String n = profile.getName();
if (n == null) {
n = ((Skull) blockState).getOwningPlayer().getName();
}
return new Element(n).getAttribute(attribute);
}
}

Expand Down

0 comments on commit 89ad6eb

Please sign in to comment.