Package me.bimmr.bimmcore.misc
Class Cooldown<T>
- java.lang.Object
-
- me.bimmr.bimmcore.misc.Cooldown<T>
-
public class Cooldown<T> extends java.lang.Object
An easy to use Cooldown class
-
-
Constructor Summary
Constructors Constructor Description Cooldown(long time)
Instantiates a new Cooldown.
-
Method Summary
Modifier and Type Method Description void
addToCooldown(T player)
Add the player to the cooldownlong
getSecondsRemaining(T player)
Get the remaining secondslong
getTimeRemaining(T player)
Get the remaining timeboolean
isCooledDown(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
-
-