Annotation Interface Cooldown


@Documented @Retention(RUNTIME) @Target(METHOD) public @interface Cooldown
Author:
Despical

Created at 1.02.2024

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    long
    The time between using command again.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Command senders that have this permission will bypass the command cooldown.
    boolean
    If option is true, console will be affected by cooldowns; otherwise, it will override the delay to use the command again.
    The time unit of command cooldown.
  • Element Details

    • value

      long value
      The time between using command again. Use 0 (zero) or a negative value for no cooldown.
      Returns:
      value of the time to use the command again.
    • timeUnit

      TimeUnit timeUnit
      The time unit of command cooldown.
      Returns:
      unit of the cooldown.
      Default:
      SECONDS
    • bypassPerm

      String bypassPerm
      Command senders that have this permission will bypass the command cooldown.
      Returns:
      permission that can bypass cooldown.
      Default:
      ""
    • overrideConsole

      boolean overrideConsole
      If option is true, console will be affected by cooldowns; otherwise, it will override the delay to use the command again.
      Returns:
      false if console overrides cooldowns, otherwise true
      Default:
      false