Interface EventListener<T extends Event>

Type Parameters:
T - the type of the event
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@NullMarked @FunctionalInterface public interface EventListener<T extends Event>
The EventListener interface defines the api for listening to emitted Events of a certain type.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onEvent(T event)
    Function called whenever an Event that is listened to is emitted.
  • Method Details

    • onEvent

      void onEvent(T event)
      Function called whenever an Event that is listened to is emitted.
      Parameters:
      event - the event the was emitted