Class ConsumableSpigot

java.lang.Object
valorless.rarespawns.builders.components.ConsumableSpigot

public class ConsumableSpigot extends Object
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

    Constructors
    Constructor
    Description
    ConsumableSpigot(valorless.valorlessutils.config.Config config)
    Initializes the Spigot consumable component based on the provided configuration.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    apply(org.bukkit.inventory.ItemStack item)
    Applies the consumable component to the given item stack.
    org.bukkit.inventory.meta.components.consumable.ConsumableComponent
    Retrieves the underlying ConsumableComponent.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.