Class Consumable

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

public class Consumable extends Object
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
Links to RareSpawns platform detection:
  • invalid reference
    valorless.rarespawns.ServerType
Links to config:
  • Config
  • Constructor Summary

    Constructors
    Constructor
    Description
    Consumable(valorless.valorlessutils.config.Config config)
    Initializes the 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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:
      • Config
  • 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:
      • ItemStack
      • invalid reference
        valorless.rarespawns.ServerType