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.

@FunctionalInterface public interface EventListener<T extends Event>
Represents a listener accepting Events of a specified type.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    handle(T event)
    Called when a Event registered to this listener is called.
  • Method Details

    • handle

      void handle(T event) throws Exception
      Called when a Event registered to this listener is called.
      Parameters:
      event - The called event
      Throws:
      Exception - If an error occurs