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

public class Cooldown extends Object
Represents a cooldown component that can be applied to an item. This component defines the cooldown behavior when the item is used.

Links to Bukkit API:

  • UseCooldownComponent
  • NamespacedKey
  • ItemStack
  • ItemMeta
  • Constructor Summary

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

    Modifier and Type
    Method
    Description
    void
    apply(org.bukkit.inventory.ItemStack item)
    Applies the cooldown 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

    • Cooldown

      public Cooldown(valorless.valorlessutils.config.Config config)
      Initializes the cooldown component based on the provided configuration.

      Supported config keys:

      • use-cooldown.cooldown
      • use-cooldown.group
      Parameters:
      config - The configuration object containing cooldown settings.
      See Also:
      • Config
  • Method Details

    • apply

      public void apply(org.bukkit.inventory.ItemStack item)
      Applies the cooldown component to the given item stack.
      Parameters:
      item - The item stack to apply the component to.
      See Also:
      • ItemStack
      • ItemMeta