
Suggestion: get heads from the GameProfile
Zailer43 opened this issue ยท 1 comments
If instead of obtaining the head from the username you obtain it from the GameProfile you can have better compatibility in case it is a non-premium server and users use skin with /skin
item = new ItemStack(Items.PLAYER_HEAD);
NbtCompound skullOwner = new NbtCompound();
NbtHelper.writeGameProfile(skullOwner, player.getGameProfile());
item.setSubNbt(SkullItem.SKULL_OWNER_KEY, skullOwner);