Package-level declarations

Types

Link copied to clipboard
class Cooldowns<K : Any>(timeSource: TimeSource = SystemTimeSource)

Manages cooldowns for keys of type K.

Link copied to clipboard
class Debounce<K : Any>(timeSource: TimeSource = SystemTimeSource)

Handles debouncing for keys of type K.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A TimeSource that uses the system time.

Link copied to clipboard
fun interface TimeSource

Represents a source of time.

Functions

Link copied to clipboard
fun PlayerDebounce.allowEvery(player: Player, minInterval: Duration): Boolean

Tries to allow an action for the specified player with the given minInterval.

Link copied to clipboard
fun PlayerCooldowns.tryUse(player: Player, cooldown: Duration): Boolean

Tries to use the cooldown for the specified player with the given cooldown.