Class CooldownManager<C>
java.lang.Object
org.incendo.cloud.processors.cooldown.CooldownManager<C>
- Type Parameters:
C- command sender type
Manager for the cooldown system.
- Since:
- 1.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionMeta that adds the given cooldown to the command. -
Method Summary
Modifier and TypeMethodDescriptionReturns the configuration for this manager.static <C> @NonNull CooldownManager<C>cooldownManager(@NonNull Function<ImmutableCooldownConfiguration.RepositoryBuildStage<C>, ImmutableCooldownConfiguration.BuildFinal<C>> configuration) Creates a new cooldown manager using the givenconfiguration.static <C> @NonNull CooldownManager<C>cooldownManager(@NonNull CooldownConfiguration<C> configuration) Creates a new cooldown manager using the givenconfiguration.Returns aCommandPostprocessorthat will prevent commands from executing if they are marked as needing confirmation.Returns the cooldown repository.
-
Field Details
-
META_COOLDOWN_DURATION
Meta that adds the given cooldown to the command.
-
-
Method Details
-
cooldownManager
public static <C> @NonNull CooldownManager<C> cooldownManager(@NonNull CooldownConfiguration<C> configuration) Creates a new cooldown manager using the givenconfiguration.- Type Parameters:
C- command sender type- Parameters:
configuration- configuration for the cooldown manager- Returns:
- the created manager
-
cooldownManager
public static <C> @NonNull CooldownManager<C> cooldownManager(@NonNull Function<ImmutableCooldownConfiguration.RepositoryBuildStage<C>, ImmutableCooldownConfiguration.BuildFinal<C>> configuration) Creates a new cooldown manager using the givenconfiguration.- Type Parameters:
C- command sender type- Parameters:
configuration- configuration for the cooldown manager- Returns:
- the created manager
-
configuration
Returns the configuration for this manager.- Returns:
- the configuration
-
repository
Returns the cooldown repository.- Returns:
- the repository
-
createPostprocessor
Returns aCommandPostprocessorthat will prevent commands from executing if they are marked as needing confirmation.- Returns:
- confirmation postprocessor
-