Package org.leralix.lib.utils
Class HeadUtils
java.lang.Object
org.leralix.lib.utils.HeadUtils
The class used to manage every head related commands
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidAdd lore to anItemStackstatic org.bukkit.inventory.ItemStackcreateCustomItemStack(org.bukkit.inventory.ItemStack item, String itemName, String... lore) Create anItemStackwith custom Lore.static org.bukkit.inventory.ItemStackcreateCustomItemStack(org.bukkit.inventory.ItemStack item, String itemName, List<String> lore) static org.bukkit.inventory.ItemStackcreateCustomItemStack(org.bukkit.Material itemMaterial, String itemName) Create anItemStackwith custom Lorestatic org.bukkit.inventory.ItemStackcreateCustomItemStack(org.bukkit.Material itemMaterial, String itemName, String... loreLines) Create anItemStackwith custom Lorestatic org.bukkit.inventory.ItemStackcreateCustomItemStack(org.bukkit.Material itemMaterial, String itemName, List<String> lore) Create anItemStackwith custom Lore.static org.bukkit.inventory.ItemStackcreateCustomItemStack(org.bukkit.Material itemMaterial, String itemName, List<String> lore, String... loreLines) Create anItemStackwith custom Lore.static org.bukkit.inventory.ItemStackgetPlayerHead(String headName, org.bukkit.OfflinePlayer offlinePlayer) Create a player headItemStack.static org.bukkit.inventory.ItemStackgetPlayerHead(String headName, org.bukkit.OfflinePlayer offlinePlayer, String... loreLines) Create a player headItemStack.static org.bukkit.inventory.ItemStackgetPlayerHead(String headName, org.bukkit.OfflinePlayer offlinePlayer, List<String> lore) Create a player headItemStack.static org.bukkit.inventory.ItemStackgetPlayerHead(org.bukkit.OfflinePlayer offlinePlayer) Create a player head with the player name as name of theItemStackstatic org.bukkit.inventory.ItemStackgetPlayerHead(org.bukkit.OfflinePlayer offlinePlayer, String... loreLines) Create a player headItemStack.static URLgetUrlFromBase64_2(String base64) static org.bukkit.inventory.ItemStackstatic org.bukkit.inventory.ItemStackmakeSkullB64(String name, String base64EncodedString) Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads.static org.bukkit.inventory.ItemStackmakeSkullB64(String name, String base64EncodedString, String... loreLines) Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads.static org.bukkit.inventory.ItemStackmakeSkullB64(String name, String base64EncodedString, List<String> lore) Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads.static org.bukkit.inventory.ItemStackCreate a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads.static org.bukkit.inventory.ItemStackmakeSkullURL(String name, String url, String... lore) static org.bukkit.inventory.ItemStackmakeSkullURL(String name, String url, List<String> lore) static org.bukkit.inventory.ItemStackmakeSkullURL(String name, URL url, String... lore) static org.bukkit.inventory.ItemStackmakeSkullURL(String name, URL url, List<String> lore) static voidSet the lore of anItemStackstatic voidSet the lore of anItemStackstatic voidSet the lore of anItemStack
-
Constructor Details
-
HeadUtils
public HeadUtils()
-
-
Method Details
-
getPlayerHead
public static org.bukkit.inventory.ItemStack getPlayerHead(String headName, org.bukkit.OfflinePlayer offlinePlayer, List<String> lore) Create a player headItemStack.- Parameters:
headName- The name of the new createdItemStack.offlinePlayer- The player to extract the head from.lore- The lore of the new createdItemStack.- Returns:
- The head of the player as an
ItemStack.
-
getPlayerHead
public static org.bukkit.inventory.ItemStack getPlayerHead(String headName, org.bukkit.OfflinePlayer offlinePlayer, String... loreLines) Create a player headItemStack.- Parameters:
headName- The name of the new createdItemStack.offlinePlayer- The player to extract the head from.loreLines- The lore of the new createdItemStack.- Returns:
- The head of the player as an
ItemStack.
-
getPlayerHead
public static org.bukkit.inventory.ItemStack getPlayerHead(org.bukkit.OfflinePlayer offlinePlayer, String... loreLines) Create a player headItemStack.- Parameters:
offlinePlayer- The player to extract the head from.loreLines- The lore of the new createdItemStack.- Returns:
- The head of the player as an
ItemStack.
-
getPlayerHead
public static org.bukkit.inventory.ItemStack getPlayerHead(String headName, org.bukkit.OfflinePlayer offlinePlayer) Create a player headItemStack.- Parameters:
headName- The name of the new createdItemStack.offlinePlayer- The player to extract the head from.- Returns:
- The head of the player as an
ItemStack.
-
getPlayerHead
public static org.bukkit.inventory.ItemStack getPlayerHead(org.bukkit.OfflinePlayer offlinePlayer) Create a player head with the player name as name of theItemStack- Parameters:
offlinePlayer- The name of the new createdItemStack.- Returns:
- The head of the player as an
ItemStack.
-
makeSkullB64
public static org.bukkit.inventory.ItemStack makeSkullB64(String name, String base64EncodedString, List<String> lore) Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads. This method calls an unsafe bukkit methods but no other methods have been found- Parameters:
name- The name of the new created head.base64EncodedString- The base64 encoded String of the new head.lore- The lore of the new created head.- Returns:
- The
ItemStackwith custom texture.
-
makeSkullURL
-
makeSkullURL
-
makeSkullURL
-
makeSkullURL
-
makeSkull
-
getUrlFromBase64_2
-
makeSkullB64
Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads. This method calls an unsafe bukkit methods but no other methods have been found- Parameters:
name- The name of the new created head.base64EncodedString- The base64 encoded String of the new head.- Returns:
- The
ItemStackwith custom texture.
-
makeSkullB64
public static org.bukkit.inventory.ItemStack makeSkullB64(String name, String base64EncodedString, String... loreLines) Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads. This method calls an unsafe bukkit methods but no other methods have been found- Parameters:
name- The name of the new created head.base64EncodedString- The base64 encoded String of the new head.loreLines- The lore of the new created head.- Returns:
- The
ItemStackwith custom texture.
-
makeSkullB64
public static org.bukkit.inventory.ItemStack makeSkullB64(String name, String base64EncodedString, List<String> lore, String... loreLines) Create a head from base64 encoded string This method is called when loading custom heads from the internet Check minecraft-heads.com for more heads. This method calls an unsafe bukkit methods but no other methods have been found- Parameters:
name- The name of the new created head.base64EncodedString- The base64 encoded String of the new head.lore- The lore of the new created head.loreLines- Additional lore.- Returns:
- The
ItemStackwith custom texture.
-
createCustomItemStack
public static org.bukkit.inventory.ItemStack createCustomItemStack(org.bukkit.Material itemMaterial, String itemName) Create anItemStackwith custom Lore- Parameters:
itemMaterial- The data of the region to displayitemName- The display name of the item- Returns:
- The ItemStack displaying the town
-
createCustomItemStack
public static org.bukkit.inventory.ItemStack createCustomItemStack(org.bukkit.Material itemMaterial, String itemName, String... loreLines) Create anItemStackwith custom Lore- Parameters:
itemMaterial- The data of the region to displayitemName- The display name of the itemloreLines- The lore of the item- Returns:
- The ItemStack displaying the town
-
createCustomItemStack
public static org.bukkit.inventory.ItemStack createCustomItemStack(org.bukkit.Material itemMaterial, String itemName, List<String> lore, String... loreLines) Create anItemStackwith custom Lore.- Parameters:
itemMaterial- The data of the region to display.itemName- The display name of the item.lore- The lore of the item.loreLines- Additional lore.- Returns:
- The ItemStack displaying the town.
-
createCustomItemStack
public static org.bukkit.inventory.ItemStack createCustomItemStack(org.bukkit.Material itemMaterial, String itemName, List<String> lore) Create anItemStackwith custom Lore.- Parameters:
itemMaterial- The data of the region to display.itemName- The display name of the item.lore- The lore of the item.- Returns:
- The ItemStack displaying the town.
-
createCustomItemStack
-
createCustomItemStack
public static org.bukkit.inventory.ItemStack createCustomItemStack(org.bukkit.inventory.ItemStack item, String itemName, String... lore) Create anItemStackwith custom Lore.- Parameters:
item- The Itemstack to use.itemName- The display name of the item.lore- The lore of the item.- Returns:
- The ItemStack displaying the town.
-
setLore
Set the lore of anItemStack- Parameters:
itemStack- The item stack to set the lorelore- The lore to set
-
setLore
Set the lore of anItemStack- Parameters:
itemStack- The item stack to set the loreloreLines- The lore to set
-
setLore
public static void setLore(org.bukkit.inventory.ItemStack itemStack, List<String> lore, String... loreLines) Set the lore of anItemStack- Parameters:
itemStack- The item stack to set the lorelore- The lore to setloreLines- Additional lore
-
addLore
Add lore to anItemStack- Parameters:
itemStack- The item stack to add the loreloreLines- The lore to add
-