Class SimpleCooldown
-
- All Implemented Interfaces:
-
com.github.spigotbasics.core.cooldown.Cooldown
public final class SimpleCooldown<T extends Object, Z extends Object> implements Cooldown<T>
-
-
Constructor Summary
Constructors Constructor Description SimpleCooldown(Function1<T, Z> mapper, Long defaultDuration, TimeUnit defaultUnit)
-
Method Summary
Modifier and Type Method Description Unit
startCooldown(T key, Long duration, TimeUnit unit)
Unit
startCooldown(T key)
Boolean
isOnCooldown(T key)
Long
getRemainingTime(T key, TimeUnit unit)
Unit
removeCooldown(T key)
Unit
clear()
Unit
clearExpiredEntries()
-
-
Method Detail
-
startCooldown
Unit startCooldown(T key, Long duration, TimeUnit unit)
-
startCooldown
Unit startCooldown(T key)
-
isOnCooldown
Boolean isOnCooldown(T key)
-
getRemainingTime
Long getRemainingTime(T key, TimeUnit unit)
-
removeCooldown
Unit removeCooldown(T key)
-
clearExpiredEntries
Unit clearExpiredEntries()
-
-
-
-