Class CustomItemManager
java.lang.Object
com.zetaplugins.lifestealz.util.customitems.CustomItemManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NamespacedKeystatic final NamespacedKeystatic final NamespacedKeystatic final NamespacedKeystatic final NamespacedKeystatic final NamespacedKey -
Method Summary
Modifier and TypeMethodDescriptionstatic ItemStackcreateBackItem(int page) Creates a back item for paginated GUIsstatic ItemStackCreates a close item for GUIsstatic ItemStackcreateCustomItem(String itemId) Creates a custom itemstatic ItemStackcreateCustomItem(String itemId, int amount) Creates a custom item with a specific amountstatic ItemStackCreates the default heart itemstatic ItemStackCreates the totem used for the heart animationstatic ItemStackCreates the revive heart itemstatic ItemStackCreates the kill heart itemstatic ItemStackCreates the max hearts heart itemstatic ItemStackCreates the natural death heart itemstatic ItemStackcreateNextItem(int page) Creates a next item for paginated GUIsstatic ItemStackCreates the withdraw heart itemstatic ItemStackgetBedrockPlayerHead(UUID uuid) Gets a skeleton skull instead of a headstatic CustomItemDatagetCustomItemData(String itemId) Gets the custom item data of an itemstatic @Nullable StringgetCustomItemId(ItemStack item) Gets the custom item id of an itemstatic ItemStackgetPlayerHead(OfflinePlayer offlinePlayer) Gets the head of an offline playerstatic booleanisCustomItem(ItemStack item) Checks if an item is a custom item (checks if it has a custom item id)static booleanisDespawnable(ItemStack item) Checks if an item is despawnablestatic booleanisForbiddenItem(ItemStack item) Checks if an item is a forbidden itemstatic booleanisHeartItem(ItemStack item) Deprecated.static booleanisInvulnerable(ItemStack item) Checks if an item is invulnerablestatic booleanisReviveItem(ItemStack item) Deprecated.UseCustomItemType.REVIVEinstead
-
Field Details
-
CUSTOM_ITEM_ID_KEY
-
CUSTOM_ITEM_TYPE_KEY
-
CUSTOM_HEART_VALUE_KEY
-
REVIVE_PAGE_KEY
-
DESPAWNABLE_KEY
-
INVULNERABLE_KEY
-
-
Method Details
-
createCustomItem
Creates a custom item- Parameters:
itemId- The id of the item- Returns:
- The custom item
-
createCustomItem
Creates a custom item with a specific amount- Parameters:
itemId- The id of the itemamount- The amount of the item- Returns:
- The custom item
-
createHeart
Creates the default heart item- Returns:
- The default heart item
-
createWithdrawHeart
Creates the withdraw heart item- Returns:
- The withdraw heart item
-
createKillHeart
Creates the kill heart item- Returns:
- The kill heart item
-
createNaturalDeathHeart
Creates the natural death heart item- Returns:
- The natural death heart item
-
createHeartGainCooldownHeart
Creates the revive heart item- Returns:
- The revive heart item
-
createMaxHealthHeart
Creates the max hearts heart item- Returns:
- The max hearts heart item
-
createCloseItem
Creates a close item for GUIs- Returns:
- The close item
-
createBackItem
Creates a back item for paginated GUIs- Parameters:
page- The page to go back to- Returns:
- The back item
-
createNextItem
Creates a next item for paginated GUIs- Parameters:
page- The page to go to- Returns:
- The next item
-
createHeartAnimationTotem
Creates the totem used for the heart animation- Returns:
- The heart animation totem
-
isHeartItem
Deprecated.UseCustomItemType.HEARTinsteadChecks if an item is a heart item- Parameters:
item- The item to check- Returns:
- If the item is a heart item
-
isReviveItem
Deprecated.UseCustomItemType.REVIVEinsteadChecks if an item is a revive item- Parameters:
item- The item to check- Returns:
- If the item is a revive item
-
isForbiddenItem
Checks if an item is a forbidden item- Parameters:
item- The item to check- Returns:
- If the item is a forbidden item
-
isCustomItem
Checks if an item is a custom item (checks if it has a custom item id)- Parameters:
item- The item to check- Returns:
- If the item is a custom item
-
isDespawnable
Checks if an item is despawnable- Parameters:
item- The item to check- Returns:
- If the item is despawnable
-
isInvulnerable
Checks if an item is invulnerable- Parameters:
item- The item to check- Returns:
- If the item is invulnerable
-
getCustomItemId
Gets the custom item id of an item- Parameters:
item- The item to get the id from- Returns:
- The custom item id
-
getPlayerHead
Gets the head of an offline player- Parameters:
offlinePlayer- The offline player- Returns:
- The head of the player
-
getBedrockPlayerHead
Gets a skeleton skull instead of a head- Parameters:
uuid- The uuid of the bedrock player- Returns:
- A skeleton skull
-
getCustomItemData
Gets the custom item data of an item- Parameters:
itemId- The id of the item- Returns:
- The custom item data
-
CustomItemType.HEARTinstead