Skip to content

Cooldown

Marcin Grzywacz edited this page Nov 4, 2022 · 2 revisions

You generally have a cooldown annotation that provides a cooldown to command so player can't execute certain commands too quickly
@Cooldown("2mo 1d 3h 4m 3s") the following will cooldown command for 2 months 1 day 3 hours 4 minutes and 3 seconds after usage

@HelpCMD
class TestCMD {
    @Cooldown("2mo 1d 3h 4m 3s")
    fun run_s(ex: CommandSender, value: Int) {
    }
    @Cooldown("8s")
    fun run_a(ex: CommandSender, value: Int) {
    }
}

Produces the following:
ezgif-5-1b3f14ed61
Also you can get the cooldown not only for methods but for whole class as well

Clone this wiki locally