Answers for "How to make a Custom Player Head 1.14.4"

0

How to make a Custom Player Head 1.14.4

ItemStack skull = new ItemStack(Material.PLAYER_HEAD); // Create a new ItemStack of the Player Head type.
SkullMeta skullMeta = (SkullMeta) skull.getItemMeta(); // Get the created item's ItemMeta and cast it to SkullMeta so we can access the skull properties
skullMeta.setOwningPlayer(Bukkit.getOfflinePlayer("username of account")); // Set the skull's owner so it will adapt the skin of the provided username (case sensitive).
skull.setItemMeta(skullMeta); // Apply the modified meta to the initial created item
Posted by: Guest on January-28-2022

Code answers related to "How to make a Custom Player Head 1.14.4"

Browse Popular Code Answers by Language