Interface UseCooldownComponent

All Superinterfaces:
ConfigurationSerializable

@Experimental public interface UseCooldownComponent extends ConfigurationSerializable
Represents a component which determines the cooldown applied to use of this item.
  • Method Details

    • getCooldownSeconds

      float getCooldownSeconds()
      Gets the time in seconds it will take for this item to be eaten.
      Returns:
      eat time
    • setCooldownSeconds

      void setCooldownSeconds(float eatSeconds)
      Sets the time in seconds it will take for this item to be eaten.
      Parameters:
      eatSeconds - new eat time, must be positive
    • 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 song)
      Sets the custom cooldown group to be used for similar items.
      Parameters:
      song - the cooldown group