Interface ImmutableCooldownConfiguration.BuildFinal<C>
- All Known Implementing Classes:
ImmutableCooldownConfiguration.Builder
- Enclosing class:
- ImmutableCooldownConfiguration<C>
public static interface ImmutableCooldownConfiguration.BuildFinal<C>
-
Method Summary
Modifier and TypeMethodDescriptionaddActiveCooldownListener(CooldownActiveListener<C> element) Adds one element toactiveCooldownListenerslist.addActiveCooldownListeners(CooldownActiveListener<C>... elements) Adds elements toactiveCooldownListenerslist.addAllActiveCooldownListeners(Iterable<? extends CooldownActiveListener<C>> elements) Adds elements toactiveCooldownListenerslist.addAllCreationListeners(Iterable<? extends CooldownCreationListener<C>> elements) Adds elements tocreationListenerslist.addCreationListener(CooldownCreationListener<C> element) Adds one element tocreationListenerslist.addCreationListeners(CooldownCreationListener<C>... elements) Adds elements tocreationListenerslist.build()Builds a newImmutableCooldownConfiguration.bypassCooldown(@NonNull Predicate<CommandContext<C>> bypassCooldown) Initializes the value for thebypassCooldownattribute.Initializes the value for theclockattribute.fallbackGroup(@NonNull Function<Command<C>, CooldownGroup> fallbackGroup) Initializes the value for thefallbackGroupattribute.profileFactory(@NonNull CooldownProfileFactory profileFactory) Initializes the value for theprofileFactoryattribute.
-
Method Details
-
addActiveCooldownListener
ImmutableCooldownConfiguration.BuildFinal<C> addActiveCooldownListener(CooldownActiveListener<C> element) Adds one element toactiveCooldownListenerslist.- Parameters:
element- A activeCooldownListeners element- Returns:
thisbuilder for use in a chained invocation
-
addActiveCooldownListeners
ImmutableCooldownConfiguration.BuildFinal<C> addActiveCooldownListeners(CooldownActiveListener<C>... elements) Adds elements toactiveCooldownListenerslist.- Parameters:
elements- An array of activeCooldownListeners elements- Returns:
thisbuilder for use in a chained invocation
-
addAllActiveCooldownListeners
ImmutableCooldownConfiguration.BuildFinal<C> addAllActiveCooldownListeners(Iterable<? extends CooldownActiveListener<C>> elements) Adds elements toactiveCooldownListenerslist.- Parameters:
elements- An iterable of activeCooldownListeners elements- Returns:
thisbuilder for use in a chained invocation
-
addCreationListener
ImmutableCooldownConfiguration.BuildFinal<C> addCreationListener(CooldownCreationListener<C> element) Adds one element tocreationListenerslist.- Parameters:
element- A creationListeners element- Returns:
thisbuilder for use in a chained invocation
-
addCreationListeners
ImmutableCooldownConfiguration.BuildFinal<C> addCreationListeners(CooldownCreationListener<C>... elements) Adds elements tocreationListenerslist.- Parameters:
elements- An array of creationListeners elements- Returns:
thisbuilder for use in a chained invocation
-
addAllCreationListeners
ImmutableCooldownConfiguration.BuildFinal<C> addAllCreationListeners(Iterable<? extends CooldownCreationListener<C>> elements) Adds elements tocreationListenerslist.- Parameters:
elements- An iterable of creationListeners elements- Returns:
thisbuilder for use in a chained invocation
-
bypassCooldown
ImmutableCooldownConfiguration.BuildFinal<C> bypassCooldown(@NonNull Predicate<CommandContext<C>> bypassCooldown) Initializes the value for thebypassCooldownattribute.If not set, this attribute will have a default value as returned by the initializer of
bypassCooldown.- Parameters:
bypassCooldown- The value for bypassCooldown- Returns:
thisbuilder for use in a chained invocation
-
clock
Initializes the value for theclockattribute.If not set, this attribute will have a default value as returned by the initializer of
clock.- Parameters:
clock- The value for clock- Returns:
thisbuilder for use in a chained invocation
-
profileFactory
ImmutableCooldownConfiguration.BuildFinal<C> profileFactory(@NonNull CooldownProfileFactory profileFactory) Initializes the value for theprofileFactoryattribute.If not set, this attribute will have a default value as returned by the initializer of
profileFactory.- Parameters:
profileFactory- The value for profileFactory- Returns:
thisbuilder for use in a chained invocation
-
fallbackGroup
ImmutableCooldownConfiguration.BuildFinal<C> fallbackGroup(@NonNull Function<Command<C>, CooldownGroup> fallbackGroup) Initializes the value for thefallbackGroupattribute.If not set, this attribute will have a default value as returned by the initializer of
fallbackGroup.- Parameters:
fallbackGroup- The value for fallbackGroup- Returns:
thisbuilder for use in a chained invocation
-
build
ImmutableCooldownConfiguration<C> build()Builds a newImmutableCooldownConfiguration.- Returns:
- An immutable instance of CooldownConfiguration
- Throws:
IllegalStateException- if any required attributes are missing
-