| Modifier and Type | Class and Description |
|---|---|
static interface |
AnnoyingCooldown.CooldownType
Implement this interface to create your own cooldown types (enums are recommended)
|
| Modifier and Type | Field and Description |
|---|---|
@NotNull AnnoyingCooldown.CooldownType |
type
The
AnnoyingCooldown.CooldownType that was used to create this cooldown |
| 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 UUID |
| Modifier and Type | Method and Description |
|---|---|
@NotNull AnnoyingPlugin |
getAnnoyingPlugin()
The
AnnoyingPlugin instance |
long |
getRemaining()
A
long of the time remaining on the cooldown |
boolean |
isOnCooldown()
A
boolean of whether the cooldown is active. |
void |
start()
Starts the cooldown
|
void |
stop()
Stops the cooldown
|
@NotNull public final @NotNull AnnoyingCooldown.CooldownType type
AnnoyingCooldown.CooldownType that was used to create this cooldownpublic AnnoyingCooldown(@NotNull
@NotNull AnnoyingPlugin plugin,
@NotNull
@NotNull java.util.UUID uuid,
@NotNull
@NotNull AnnoyingCooldown.CooldownType type)
AnnoyingCooldown.CooldownType for the specified UUIDplugin - the plugin that is creating the cooldownuuid - the UUID of the thing that is being cooled downtype - type@NotNull public @NotNull AnnoyingPlugin getAnnoyingPlugin()
AnnoyableAnnoyingPlugin instancegetAnnoyingPlugin in interface Annoyablepublic void start()
public void stop()
public long getRemaining()
long of the time remaining on the cooldownDurationFormatter.formatDuration(long, String, boolean)public boolean isOnCooldown()
boolean of whether the cooldown is active. If the cooldown is not active, it will be stopped