Package day.dean.skullcreator
Class SkullCreator
java.lang.Object
day.dean.skullcreator.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 Summary
Modifier and TypeMethodDescriptionstatic voidblockWithBase64(Block block, String base64) Sets the block to a skull with the skin for the base64 string.static voidblockWithName(Block block, String name) Deprecated.names don't make for good identifiers.static voidblockWithUrl(Block block, String url) Sets the block to a skull with the skin found at the provided mojang URL.static voidblockWithUuid(Block block, UUID id) Sets the block to a skull with the given UUID.static ItemStackCreates a player skull, should work in both legacy and new Bukkit APIs.static ItemStackitemFromBase64(String base64) Creates a player skull item with the skin based on a base64 string.static ItemStackitemFromName(String name) Deprecated.names don't make for good identifiers.static ItemStackitemFromUrl(String url) Creates a player skull item with the skin at a Mojang URL.static ItemStackitemFromUuid(UUID id) Creates a player skull item with the skin based on a player's UUID.static ItemStackitemWithBase64(ItemStack item, String base64) Modifies a skull to use the skin based on the given base64 string.static ItemStackitemWithName(ItemStack item, String name) Deprecated.names don't make for good identifiers.static ItemStackitemWithUrl(ItemStack item, String url) Modifies a skull to use the skin at the given Mojang URL.static ItemStackitemWithUuid(ItemStack item, UUID id) Modifies a skull to use the skin of the player with a given UUID.
-
Method Details
-
createSkull
Creates a player skull, should work in both legacy and new Bukkit APIs. -
itemFromName
Deprecated.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.
-
itemFromUuid
Creates 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.
-
itemFromUrl
Creates a player skull item with the skin at a Mojang URL.- Parameters:
url- The Mojang URL.- Returns:
- The head of the Player.
-
itemFromBase64
Creates 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.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.
-
itemWithUuid
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.
-
itemWithUrl
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.
-
itemWithBase64
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.
-
blockWithName
Deprecated.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.
-
blockWithUuid
Sets the block to a skull with the given UUID.- Parameters:
block- The block to set.id- The player to set it to.
-
blockWithUrl
Sets 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.
-
blockWithBase64
Sets 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.
-