Class ConsumableSpigot
java.lang.Object
valorless.rarespawns.builders.components.ConsumableSpigot
Represents a Spigot-specific consumable component that can be applied to an item.
This component defines the behavior when the item is consumed, utilizing Spigot's API.
-
Constructor Summary
ConstructorsConstructorDescriptionConsumableSpigot(valorless.valorlessutils.config.Config config) Initializes the Spigot consumable component based on the provided configuration. -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(org.bukkit.inventory.ItemStack item) Applies the consumable component to the given item stack.org.bukkit.inventory.meta.components.consumable.ConsumableComponentRetrieves the underlying ConsumableComponent.
-
Constructor Details
-
ConsumableSpigot
public ConsumableSpigot(valorless.valorlessutils.config.Config config) Initializes the Spigot consumable component based on the provided configuration.- Parameters:
config- The configuration object containing consumable settings.
-
-
Method Details
-
getComponent
public org.bukkit.inventory.meta.components.consumable.ConsumableComponent getComponent()Retrieves the underlying ConsumableComponent.- Returns:
- The ConsumableComponent instance.
-
apply
public void apply(org.bukkit.inventory.ItemStack item) Applies the consumable component to the given item stack.- Parameters:
item- The item stack to apply the component to.
-