CooldownTracker

interface CooldownTracker

The tracker of item cooldowns for an object.

Functions

Link copied to clipboard
abstract fun getCooldown(item: ItemType): Int

Gets the current cooldown for the given item, or returns -1 if there is no cooldown for the given item.

Link copied to clipboard
abstract fun getCooldownPercentage(item: ItemType): Float

Gets the current cooldown percentage for the given item.

Link copied to clipboard
abstract fun hasCooldown(item: ItemType): Boolean

Checks if the given item is currently on cooldown.

Link copied to clipboard
abstract fun resetCooldown(item: ItemType)

Resets the cooldown for the given item.

Link copied to clipboard
abstract fun setCooldown(item: ItemType, ticks: Int)

Sets the cooldown for the given item to the given amount of ticks.