public class CooldownException
extends java.lang.RuntimeException
CommandActor has to wait before executing a
command again. This is set by Cooldown.| Constructor and Description |
|---|
CooldownException(long timeLeft)
Creates a new
CooldownException with the given timestamp
in milliseconds |
CooldownException(java.util.concurrent.TimeUnit unit,
long timeLeft)
Creates a new
CooldownException with the given timestamp
in any unit |
| Modifier and Type | Method and Description |
|---|---|
long |
getTimeLeft(@NotNull java.util.concurrent.TimeUnit unit)
Returns the time left in the given unit
|
long |
getTimeLeftMillis()
Returns the time left before being able to execute again
|
public CooldownException(long timeLeft)
CooldownException with the given timestamp
in millisecondstimeLeft - The time left in millisecondspublic CooldownException(java.util.concurrent.TimeUnit unit,
long timeLeft)
CooldownException with the given timestamp
in any unitunit - The time unit in which the time left is giventimeLeft - The time left in the given unitpublic long getTimeLeftMillis()
public long getTimeLeft(@NotNull
@NotNull java.util.concurrent.TimeUnit unit)
unit - Unit to convert to