Interface PrioritizedLifecycleEventHandlerConfiguration<O extends LifecycleEventOwner>

Type Parameters:
O - the required owner type
All Superinterfaces:
LifecycleEventHandlerConfiguration<O>

@Experimental @NonExtendable public interface PrioritizedLifecycleEventHandlerConfiguration<O extends LifecycleEventOwner> extends LifecycleEventHandlerConfiguration<O>
Handler configuration that allows both "monitor" and prioritized handlers. The default priority is 0.
  • Method Details

    • priority

      @Contract("_ -> this") PrioritizedLifecycleEventHandlerConfiguration<O> priority(int priority)
      Sets the priority for this handler. Resets all previous calls to monitor(). A lower numeric value correlates to the handler being run earlier.
      Parameters:
      priority - the numerical priority
      Returns:
      this configuration for chaining
    • monitor

      Sets this handler configuration to be considered a "monitor". These handlers will run last and should only be used by plugins to observe any changes from previously ran handlers.
      Returns:
      this configuration for chaining