Closed Zailer43 closed 2 years ago
https://github.com/Sjouwer/pick-block-pro/blob/e0e2bde34d8b9ff8eaf2feb337ae6bdfac06f6df/src/main/java/io/github/sjouwer/pickblockpro/picker/BlockPicker.java#L96-L99 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);
Thank you for the suggestion, that sounds like a good idea. I will implement that soon, or if you like you can also make a PR for it.
https://github.com/Sjouwer/pick-block-pro/blob/e0e2bde34d8b9ff8eaf2feb337ae6bdfac06f6df/src/main/java/io/github/sjouwer/pickblockpro/picker/BlockPicker.java#L96-L99 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