Skip to content

Commit

Permalink
remove debug lines
Browse files Browse the repository at this point in the history
  • Loading branch information
crashdemons committed Oct 25, 2018
1 parent 1f56bc7 commit bbfc81b
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,20 +129,17 @@ public static String getSkullOwner(Skull skullBlockState){
public static TexturedSkullType skullTypeFromItemStack(ItemStack stack){
TexturedSkullType type = TexturedSkullType.get(stack.getType());//guess skullState by material
if(type==null){
System.out.println("Material not found "+stack.getType().name());
//System.out.println("Material not found "+stack.getType().name());
return null;
}
if(type.hasDedicatedItem() && type!=TexturedSkullType.PLAYER) return type;//if it's not a player then it's a dedicated skullState item reserved for the mob
//if it's a playerhead, then we need to resolve further
SkullMeta skullState = (SkullMeta) stack.getItemMeta();
OfflinePlayer op =getSkullOwningPlayer(skullState);//skullState.getOwningPlayer();
if(op==null) System.out.println("OwningPlayer Null");
if(op==null) return TexturedSkullType.PLAYER;
UUID owner = op.getUniqueId();
if(owner==null) System.out.println("owner UUID null");
if(owner==null) return TexturedSkullType.PLAYER;
TexturedSkullType match = TexturedSkullType.get(owner);//check if the UUID matches any in our textured skullState list
if(match==null) System.out.println("get-by-uuid null (from "+owner.toString()+")");
if(match==null) return TexturedSkullType.PLAYER;
return match;//if match was not null
}
Expand Down

0 comments on commit bbfc81b

Please sign in to comment.