Interface CooldownGroup

All Known Implementing Classes:
CooldownGroup.CommandCooldownGroup, CooldownGroup.NamedCooldownGroup

@API(status=STABLE, since="1.0.0") public interface CooldownGroup
Groups cooldown together.

If two commands belong to the same group, the cooldown will be shared between those commands.

Since:
1.0.0
  • Method Details

    • command

      static CooldownGroup command(@NonNull Command<?> command)
      Creates a new cooldown group that is unique to the given command.

      This means that the cooldown will not be shared with any other commands.

      Parameters:
      command - the command
      Returns:
      the group
    • named

      static CooldownGroup named(@NonNull String name)
      Creates a new cooldown group identified by the given name.
      Parameters:
      name - group name
      Returns:
      the group