Class Consumable
java.lang.Object
valorless.rarespawns.builders.components.Consumable
Represents a consumable component that can be applied to an item.
This component defines the behavior when the item is consumed.
Links to Bukkit API:
ItemStack
-
invalid reference
valorless.rarespawns.ServerType
Config
-
Constructor Summary
ConstructorsConstructorDescriptionConsumable(valorless.valorlessutils.config.Config config) Initializes the 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.
-
Constructor Details
-
Consumable
public Consumable(valorless.valorlessutils.config.Config config) Initializes the consumable component based on the provided configuration.- Parameters:
config- The configuration object containing consumable settings.- See Also:
-
-
Method Details
-
apply
public void apply(org.bukkit.inventory.ItemStack item) Applies the consumable component to the given item stack. Chooses the correct implementation based on the server type (Paper or Spigot).- Parameters:
item- The item stack to apply the component to.- See Also:
-