public class HeadDatabaseAPI
extends java.lang.Object
| Constructor and Description |
|---|
HeadDatabaseAPI() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addHead(CategoryEnum category,
Head head)
Adds a new Head to the database
|
java.lang.String |
addHead(CategoryEnum category,
java.lang.String name,
java.lang.String base64)
Adds a head to the database
|
java.lang.String |
addHead(CategoryEnum category,
java.lang.String name,
java.util.UUID uuid)
Adds a head to the database
|
java.lang.String |
getBase64(Block block)
Gets the base64 String from a Block
|
java.lang.String |
getBase64(ItemStack itemStack)
Gets the base64 String from an ItemStack
|
java.lang.String |
getBase64(java.lang.String id)
Gets the base64 string from a head ID
|
java.lang.String |
getBlockID(Block block)
Gets the head ID of a Block
|
CategoryEnum |
getCategory(java.lang.String id)
Gets the Category that a head ID is part of
|
java.util.List<Head> |
getHeads(CategoryEnum category)
Gets a List of all Heads in a given category in the database
|
ItemStack |
getItemHead(Block block)
Gets an ItemStack of a head from a player skull Block
|
ItemStack |
getItemHead(java.lang.String id)
Gets an ItemStack of a head with the given ID
|
java.lang.String |
getItemID(ItemStack itemStack)
Gets the head ID of an ItemStack
|
ItemStack |
getRandomHead() |
boolean |
isDecorativeHead(Block block)
Checks if a Block is a decorative (non-player) head
|
boolean |
isDecorativeHead(ItemStack itemStack)
Checks if an ItemStack is a decorative (non-player) head
|
boolean |
isHead(java.lang.String ID)
Checks whether a head exists with the given ID
|
boolean |
removeHead(java.lang.String id)
Removes a head from the database
|
boolean |
setBlockSkin(Block block,
java.lang.String id)
Sets the texture of a player head block to the given head ID
|
void |
setPrefixID(java.lang.String prefix)
Sets the prefix ID to be used by the API for added heads
|
public void setPrefixID(java.lang.String prefix)
prefix - The prefix to usepublic boolean isHead(java.lang.String ID)
ID - The ID to checkpublic boolean isDecorativeHead(Block block)
block - The block to checkpublic boolean isDecorativeHead(ItemStack itemStack)
itemStack - The item to checkpublic ItemStack getItemHead(java.lang.String id)
id - The ID of the head to getpublic ItemStack getItemHead(Block block)
block - The ID of the head to getpublic java.lang.String getItemID(ItemStack itemStack)
itemStack - The item to get the ID frompublic java.lang.String getBlockID(Block block)
block - The block to get the ID frompublic java.lang.String getBase64(java.lang.String id)
id - The ID of the headpublic java.lang.String getBase64(ItemStack itemStack)
itemStack - The ItemStackpublic java.lang.String getBase64(Block block)
block - The Block to get the base64 string frompublic boolean addHead(CategoryEnum category, Head head)
category - The category to add the head tohead - The head to addpublic java.util.List<Head> getHeads(CategoryEnum category)
category - The category to checkpublic ItemStack getRandomHead()
public CategoryEnum getCategory(java.lang.String id)
id - The ID of the headpublic boolean setBlockSkin(Block block, java.lang.String id)
block - The block to set the texture ofid - The ID of the head to set the texture topublic java.lang.String addHead(CategoryEnum category, java.lang.String name, java.util.UUID uuid)
category - The category to add toname - The name of the headuuid - The UUID owner of the headpublic java.lang.String addHead(CategoryEnum category, java.lang.String name, java.lang.String base64)
category - The category to add toname - The name of the headbase64 - The base64 texture string of the headpublic boolean removeHead(java.lang.String id)
id - The ID of the head to remove