Interface UseCooldownComponent

All Superinterfaces:
ConfigurationSerializable

@Experimental public interface UseCooldownComponent extends ConfigurationSerializable
Represents a component which determines the cooldown applied when using this item before it is available for use again.
  • Method Details

    • getCooldownSeconds

      float getCooldownSeconds()
      Gets the time in seconds it will take for an item in this cooldown group to be available to use again.
      Returns:
      cooldown time
    • setCooldownSeconds

      void setCooldownSeconds(float cooldown)
      Sets the time in seconds it will take for an item in this cooldown group to be available to use again.
      Parameters:
      cooldown - new eat time, must be greater than 0
    • getCooldownGroup

      @Nullable @Nullable NamespacedKey getCooldownGroup()
      Gets the custom cooldown group to be used for similar items, if set.
      Returns:
      the cooldown group
    • setCooldownGroup

      void setCooldownGroup(@Nullable @Nullable NamespacedKey group)
      Sets the custom cooldown group to be used for similar items.
      Parameters:
      group - the cooldown group