Package me.despical.commons.item
Class ItemUtils
java.lang.Object
me.despical.commons.item.ItemUtils
- Author:
- Despical
Created at 30.05.2020
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.bukkit.inventory.ItemStackstatic booleanisNamed(org.bukkit.inventory.ItemStack stack) static booleanisSameItems(org.bukkit.inventory.ItemStack first, org.bukkit.inventory.ItemStack second) Checks if the given 2 items have the same display name, lore and amount.static booleanisSameItemsWithoutAmount(org.bukkit.inventory.ItemStack first, org.bukkit.inventory.ItemStack second) Checks if the given 2 items have the same display name and lore.static org.bukkit.inventory.meta.SkullMetasetPlayerHead(org.bukkit.entity.Player player, org.bukkit.inventory.meta.SkullMeta meta)
-
Field Details
-
PLAYER_HEAD_ITEM
public static final org.bukkit.inventory.ItemStack PLAYER_HEAD_ITEM
-
-
Method Details
-
isNamed
public static boolean isNamed(org.bukkit.inventory.ItemStack stack) -
isSameItems
public static boolean isSameItems(org.bukkit.inventory.ItemStack first, org.bukkit.inventory.ItemStack second) Checks if the given 2 items have the same display name, lore and amount.- Parameters:
first- the first item to checksecond- the second item to check- Returns:
trueif the given 2 items are equals and both are same amount, otherwisefalse
-
isSameItemsWithoutAmount
public static boolean isSameItemsWithoutAmount(org.bukkit.inventory.ItemStack first, org.bukkit.inventory.ItemStack second) Checks if the given 2 items have the same display name and lore.- Parameters:
first- the first item to checksecond- the second item to check- Returns:
trueif the given 2 items are equals, may not be same amount
-
getSkull
-
setPlayerHead
public static org.bukkit.inventory.meta.SkullMeta setPlayerHead(org.bukkit.entity.Player player, org.bukkit.inventory.meta.SkullMeta meta)
-