Interface Event

    • Method Detail

      • cause

        Cause cause()
        Gets the cause for the event. The Cause of the event is an object which implements the Iterable interface. So, when investigating the Cause of the event a common idiom is to use operations (functions) on the result of cause as follows: Use-case: Getting the Player (if any) responsible: Optional<Player> optPlayer = event.cause().first(Player.class);
        Returns:
        The cause
      • source

        default java.lang.Object source()
        Gets the source of the event (the first object in the cause).
        Returns:
        The event source
      • context

        default EventContext context()
        Gets the context of the event.
        Returns:
        The event context