public class CooldownManager
extends xyz.srnyx.javautilities.parents.Stringable
AnnoyingPlugin.cooldownManager,
AnnoyingCooldown| Modifier and Type | Field and Description |
|---|---|
@NotNull java.util.Set<AnnoyingCooldown> |
cooldowns
A set of all cooldowns
|
| Constructor and Description |
|---|
CooldownManager() |
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.util.Optional<AnnoyingCooldown> |
getCooldown(@NotNull java.lang.Object key,
@NotNull java.lang.Object type)
Get a cooldown with the given key and type
|
@NotNull AnnoyingCooldown |
getCooldownElseNew(@NotNull java.lang.Object key,
@NotNull java.lang.Object type)
Get a cooldown with the given key and type
If the cooldown doesn't exist yet, it will create a new one with the given key and type (it won't start it though) |
@NotNull java.util.Set<AnnoyingCooldown> |
getCooldownsByKey(@NotNull java.lang.Object key)
Get all cooldowns with the given key
|
@NotNull java.util.Set<AnnoyingCooldown> |
getCooldownsByType(@NotNull java.lang.Object type)
Get all cooldowns with the given type
|
@NotNull public final @NotNull java.util.Set<AnnoyingCooldown> cooldowns
@NotNull public @NotNull java.util.Set<AnnoyingCooldown> getCooldownsByType(@NotNull @NotNull java.lang.Object type)
type - the type of the cooldowns@NotNull public @NotNull java.util.Set<AnnoyingCooldown> getCooldownsByKey(@NotNull @NotNull java.lang.Object key)
key - the key of the cooldowns@NotNull public @NotNull java.util.Optional<AnnoyingCooldown> getCooldown(@NotNull @NotNull java.lang.Object key, @NotNull @NotNull java.lang.Object type)
key - the key of the cooldowntype - the type of the cooldown@NotNull public @NotNull AnnoyingCooldown getCooldownElseNew(@NotNull @NotNull java.lang.Object key, @NotNull @NotNull java.lang.Object type)
key - the key of the cooldowntype - the type of the cooldown