Interface EventSubscription<T extends LuckPermsEvent>

Type Parameters:
T - the event class
All Superinterfaces:
AutoCloseable

public interface EventSubscription<T extends LuckPermsEvent> extends AutoCloseable
Represents a subscription to a LuckPermsEvent.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Unregisters this handler from the event bus.
    Gets the class this handler is listening to
    Gets the event consumer responsible for handling the event
    boolean
    Returns true if this handler is active
  • Method Details

    • getEventClass

      @NonNull Class<T> getEventClass()
      Gets the class this handler is listening to
      Returns:
      the event class
    • isActive

      boolean isActive()
      Returns true if this handler is active
      Returns:
      true if this handler is still active
    • close

      void close()
      Unregisters this handler from the event bus.
      Specified by:
      close in interface AutoCloseable
    • getHandler

      @NonNull Consumer<? super T> getHandler()
      Gets the event consumer responsible for handling the event
      Returns:
      the event consumer