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 Detail

      • 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