Package valorless.valorlessutils.skulls
Class SkullCreator
java.lang.Object
valorless.valorlessutils.skulls.SkullCreator
A library for the Bukkit API to create player skulls
 from names, base64 strings, and texture URLs.
 
Does not use any NMS code, and should work across all versions.
- Author:
- deanveloper on 12/28/2016.
- 
Method SummaryModifier and TypeMethodDescriptionstatic voidblockWithBase64(org.bukkit.block.Block block, String base64) Sets the block to a skull with the skin for the base64 string.static voidblockWithName(org.bukkit.block.Block block, String name) Deprecated.names don't make for good identifiers.static voidblockWithUrl(org.bukkit.block.Block block, String url) Sets the block to a skull with the skin found at the provided mojang URL.static voidblockWithUuid(org.bukkit.block.Block block, UUID id) Sets the block to a skull with the given UUID.static org.bukkit.inventory.ItemStackCreates a player skull, should work in both legacy and new Bukkit APIs.static org.bukkit.inventory.ItemStackitemFromBase64(String base64) Creates a player skull item with the skin based on a base64 string.static org.bukkit.inventory.ItemStackitemFromName(String name) Deprecated.names don't make for good identifiers.static org.bukkit.inventory.ItemStackitemFromUrl(String url) Creates a player skull item with the skin at a Mojang URL.static org.bukkit.inventory.ItemStackitemFromUuid(UUID id) Creates a player skull item with the skin based on a player's UUID.static org.bukkit.inventory.ItemStackitemWithBase64(org.bukkit.inventory.ItemStack item, String base64) Modifies a skull to use the skin based on the given base64 string.static org.bukkit.inventory.ItemStackitemWithName(org.bukkit.inventory.ItemStack item, String name) Deprecated.names don't make for good identifiers.static org.bukkit.inventory.ItemStackitemWithUrl(org.bukkit.inventory.ItemStack item, String url) Modifies a skull to use the skin at the given Mojang URL.static org.bukkit.inventory.ItemStackitemWithUuid(org.bukkit.inventory.ItemStack item, UUID id) Modifies a skull to use the skin of the player with a given UUID.
- 
Method Details- 
createSkullpublic static org.bukkit.inventory.ItemStack createSkull()Creates a player skull, should work in both legacy and new Bukkit APIs.
- 
itemFromNameDeprecated.names don't make for good identifiers.Creates a player skull item with the skin based on a player's name.- Parameters:
- name- The Player's name.
- Returns:
- The head of the Player.
 
- 
itemFromUuidCreates a player skull item with the skin based on a player's UUID.- Parameters:
- id- The Player's UUID.
- Returns:
- The head of the Player.
 
- 
itemFromUrlCreates a player skull item with the skin at a Mojang URL.- Parameters:
- url- The Mojang URL.
- Returns:
- The head of the Player.
 
- 
itemFromBase64Creates a player skull item with the skin based on a base64 string.- Parameters:
- base64- The Base64 string.
- Returns:
- The head of the Player.
 
- 
itemWithName@Deprecated public static org.bukkit.inventory.ItemStack itemWithName(org.bukkit.inventory.ItemStack item, String name) Deprecated.names don't make for good identifiers.Modifies a skull to use the skin of the player with a given name.- Parameters:
- item- The item to apply the name to. Must be a player skull.
- name- The Player's name.
- Returns:
- The head of the Player.
 
- 
itemWithUuidpublic static org.bukkit.inventory.ItemStack itemWithUuid(org.bukkit.inventory.ItemStack item, UUID id) Modifies a skull to use the skin of the player with a given UUID.- Parameters:
- item- The item to apply the name to. Must be a player skull.
- id- The Player's UUID.
- Returns:
- The head of the Player.
 
- 
itemWithUrlpublic static org.bukkit.inventory.ItemStack itemWithUrl(org.bukkit.inventory.ItemStack item, String url) Modifies a skull to use the skin at the given Mojang URL.- Parameters:
- item- The item to apply the skin to. Must be a player skull.
- url- The URL of the Mojang skin.
- Returns:
- The head associated with the URL.
 
- 
itemWithBase64public static org.bukkit.inventory.ItemStack itemWithBase64(org.bukkit.inventory.ItemStack item, String base64) Modifies a skull to use the skin based on the given base64 string.- Parameters:
- item- The ItemStack to put the base64 onto. Must be a player skull.
- base64- The base64 string containing the texture.
- Returns:
- The head with a custom texture.
 
- 
blockWithNameDeprecated.names don't make for good identifiers.Sets the block to a skull with the given name.- Parameters:
- block- The block to set.
- name- The player to set it to.
 
- 
blockWithUuidSets the block to a skull with the given UUID.- Parameters:
- block- The block to set.
- id- The player to set it to.
 
- 
blockWithUrlSets the block to a skull with the skin found at the provided mojang URL.- Parameters:
- block- The block to set.
- url- The mojang URL to set it to use.
 
- 
blockWithBase64Sets the block to a skull with the skin for the base64 string.- Parameters:
- block- The block to set.
- base64- The base64 to set it to use.
 
 
-