Interface UseCooldown
@NonExtendable
public interface UseCooldown
Holds the contents of cooldown information when an item is used.
- Since:
- 1.21.3
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable net.kyori.adventure.key.KeyThe unique resource location to identify this cooldown group.@Positive floatseconds()The amount of seconds the cooldown will be active for.static UseCooldown.BuilderuseCooldown(@Positive float seconds) Creates a new builder for use cooldown.
-
Method Details
-
useCooldown
@Contract(value="_ -> new", pure=true) static UseCooldown.Builder useCooldown(@Positive float seconds) Creates a new builder for use cooldown.- Parameters:
seconds- the duration in seconds; must be positive- Returns:
- builder
- Since:
- 1.21.3
-
seconds
@Contract(pure=true) @Positive float seconds()The amount of seconds the cooldown will be active for.- Returns:
- cooldown seconds
- Since:
- 1.21.3
-
cooldownGroup
@Contract(pure=true) @Nullable net.kyori.adventure.key.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
- Since:
- 1.21.3
-