Package me.bimmr.bimmcore.misc
Class Cooldown<T>
- java.lang.Object
-
- me.bimmr.bimmcore.misc.Cooldown<T>
-
public class Cooldown<T> extends java.lang.ObjectAn easy to use Cooldown class
-
-
Constructor Summary
Constructors Constructor Description Cooldown(long time)Instantiates a new Cooldown.
-
Method Summary
Modifier and Type Method Description voidaddToCooldown(T player)Add the player to the cooldownlonggetSecondsRemaining(T player)Get the remaining secondslonggetTimeRemaining(T player)Get the remaining timebooleanisCooledDown(T player)Gets if the player's cooldown is over
-
-
-
Method Detail
-
addToCooldown
public void addToCooldown(T player)
Add the player to the cooldown- Parameters:
player- the player
-
getTimeRemaining
public long getTimeRemaining(T player)
Get the remaining time- Parameters:
player- the player- Returns:
- time remaining
-
getSecondsRemaining
public long getSecondsRemaining(T player)
Get the remaining seconds- Parameters:
player- the player- Returns:
- time remaining
-
isCooledDown
public boolean isCooledDown(T player)
Gets if the player's cooldown is over- Parameters:
player- the player- Returns:
- boolean
-
-