CooldownJsonProvider

Constructors

Link copied to clipboard
open fun CooldownJsonProvider(dataFolder: File)

Functions

Link copied to clipboard
open fun cooldownExists(@Nullable tablePrefix: @Nullable String, @NotNull cooldownType: @NotNull String, @NotNull cooldownOwner: @NotNull String): Boolean
Checks if a cooldown with the given type and owner exists in the database.
Link copied to clipboard
open fun createContainer(@Nullable tablePrefix: @Nullable String)
Creates the container that will hold the cooldowns.
Link copied to clipboard
open fun createCooldown(@Nullable tablePrefix: @Nullable String, @NotNull cooldownType: @NotNull String, @NotNull cooldownOwner: @NotNull String, @NotNull cooldownExpiry: @NotNull Timestamp)
Creates a new cooldown with a random UUID in the database.
open fun createCooldown(@Nullable tablePrefix: @Nullable String, @NotNull id: @NotNull String, @NotNull cooldownType: @NotNull String, @NotNull cooldownOwner: @NotNull String, @NotNull cooldownExpiry: @NotNull Timestamp)
Creates a new cooldown with the given UUID in the database.
Link copied to clipboard
open fun deleteCooldown(@Nullable tablePrefix: @Nullable String, @NotNull cooldownType: @NotNull String, @NotNull cooldownOwner: @NotNull String)
Delete a cooldown from the database
Link copied to clipboard
open fun getAllCooldowns(@Nullable tablePrefix: @Nullable String): List<Cooldown>
Retrieves all cooldowns from the database.