Interface EventConsumer<E>

  • Type Parameters:
    E - the event type
    All Known Subinterfaces:
    EventSubscriber<E>
    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 EventConsumer<E>
    A functional interface representing an object that can handle a given type of event.
    Since:
    1.0.0
    • Method Detail

      • on

        void on​(@NotNull
                E event)
         throws Throwable
        Invokes this event consumer.
        Parameters:
        event - the event
        Throws:
        Throwable - if an exception is thrown
        Since:
        1.0.0