public class AnnoyingCooldown
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
AnnoyingCooldown.CooldownType
Implement this interface to create your own cooldown types
|
| Constructor and Description |
|---|
AnnoyingCooldown(@NotNull AnnoyingPlugin plugin,
@NotNull java.util.UUID uuid,
@NotNull AnnoyingCooldown.CooldownType type)
Creates and starts a cooldown of the specified
AnnoyingCooldown.CooldownType for the specified player |
| Modifier and Type | Method and Description |
|---|---|
long |
getDuration()
The duration of the
AnnoyingCooldown.CooldownType |
long |
getRemaining()
A
long of the time remaining on the cooldown |
java.lang.String |
getRemainingPretty(@Nullable java.lang.String pattern)
getRemaining() but pretty |
boolean |
isOnCooldown()
A
boolean of whether the cooldown is active. |
void |
start()
Starts the cooldown
|
void |
stop()
Stops the cooldown
|
@Contract(pure=true)
public AnnoyingCooldown(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull java.util.UUID uuid,
@NotNull
@NotNull AnnoyingCooldown.CooldownType type)
AnnoyingCooldown.CooldownType for the specified playerplugin - the plugin that is creating the cooldownuuid - the player's UUIDtype - the cooldown typepublic void start()
public void stop()
public long getRemaining()
long of the time remaining on the cooldowngetRemainingPretty(String)public java.lang.String getRemainingPretty(@Nullable
@Nullable java.lang.String pattern)
getRemaining() but prettypattern - the pattern to format the time withgetRemaining()public long getDuration()
AnnoyingCooldown.CooldownTypeAnnoyingCooldown.CooldownType.getDuration()public boolean isOnCooldown()
boolean of whether the cooldown is active. If the cooldown is not active, it will be removed from AnnoyingPlugin.cooldowns