Skip to content

Commit

Permalink
return system null for skinless player skulls in dlocation tag
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Nov 27, 2018
1 parent 96d9ad9 commit 0274df2
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -808,6 +808,9 @@ else if (getBlock().getType() == Material.FLOWER_POT) {
BlockState blockState = getBlock().getState();
if (blockState instanceof Skull) {
PlayerProfile profile = NMSHandler.getInstance().getBlockHelper().getPlayerProfile((Skull) blockState);
if (profile == null) {
return null;
}
String n = profile.getName();
if (n == null) {
n = ((Skull) blockState).getOwningPlayer().getName();
Expand All @@ -827,6 +830,9 @@ else if (getBlock().getType() == Material.FLOWER_POT) {
BlockState blockState = getBlock().getState();
if (blockState instanceof Skull) {
PlayerProfile profile = NMSHandler.getInstance().getBlockHelper().getPlayerProfile((Skull) blockState);
if (profile == null) {
return null;
}
String name = profile.getName();
UUID uuid = profile.getUniqueId();
String texture = profile.getTexture();
Expand Down

0 comments on commit 0274df2

Please sign in to comment.