Interface UseCooldown


@NullMarked @Experimental @NonExtendable public interface UseCooldown
Holds the contents of cooldown information when an item is used.
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    The unique resource location to identify this cooldown group.
    float
    The amount of seconds the cooldown will be active for.
    useCooldown(float seconds)
    Creates a new builder for use cooldown.
  • Method Details

    • useCooldown

      @Contract(value="_ -> new", pure=true) static UseCooldown.Builder useCooldown(float seconds)
      Creates a new builder for use cooldown.
      Parameters:
      seconds - the duration in seconds; must be positive
      Returns:
      builder
    • seconds

      @Contract(pure=true) float seconds()
      The amount of seconds the cooldown will be active for.
      Returns:
      cooldown seconds
    • cooldownGroup

      @Contract(pure=true) @Nullable Key cooldownGroup()
      The unique resource location to identify this cooldown group.

      This allows items to share cooldowns with other items in the same cooldown group, if present.

      Returns:
      cooldown group, or null if not present