Package stawa.vitalstrike.items
Class CustomItems
java.lang.Object
stawa.vitalstrike.items.CustomItems
Manages custom items for the VitalStrike plugin. This class handles creation and validation of
special items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.bukkit.inventory.ItemStackCreates a new Vital Awakening item with custom properties and lore.booleanisVitalAwakening(org.bukkit.inventory.ItemStack item) Checks if the given ItemStack is a Vital Awakening item.booleanuseVitalAwakening(org.bukkit.entity.Player player) Attempts to use a Vital Awakening item from the player's main or off hand.
-
Constructor Details
-
CustomItems
Constructs a new CustomItems instance.- Parameters:
plugin- The VitalStrike plugin instance- Throws:
Errors.ConfigurationException- If there's an error in the configuration
-
-
Method Details
-
createVitalAwakening
Creates a new Vital Awakening item with custom properties and lore.- Returns:
- A new ItemStack representing the Vital Awakening item
- Throws:
Errors.ConfigurationException- If there's an error creating the item
-
useVitalAwakening
public boolean useVitalAwakening(org.bukkit.entity.Player player) Attempts to use a Vital Awakening item from the player's main or off hand. If successful, reduces the item count by 1.- Parameters:
player- The player attempting to use the Vital Awakening- Returns:
- true if the item was successfully used, false otherwise
-
isVitalAwakening
public boolean isVitalAwakening(org.bukkit.inventory.ItemStack item) Checks if the given ItemStack is a Vital Awakening item.- Parameters:
item- The ItemStack to check- Returns:
- true if the item is a valid Vital Awakening item, false if the item is null, not a TOTEM_OF_UNDYING, has no metadata, or lacks the Vital Awakening tag
-