Class LambdaEventHandler<T extends GeyserEvent>

java.lang.Object
org.geysermc.geyser.event.handlers.EventHandler<T>
org.geysermc.geyser.event.handlers.LambdaEventHandler<T>
All Implemented Interfaces:
Comparable<EventHandler<T>>, Comparator<EventHandler<T>>
Direct Known Subclasses:
ExtensionLambdaEventHandler

public class LambdaEventHandler<T extends GeyserEvent> extends EventHandler<T>
Provides an event handler for an annotated method
  • Constructor Details

  • Method Details

    • priority

      public LambdaEventHandler<T> priority(int priority)
      Set the Event Priority Defaults to PRIORTY.NORMAL (50)
      Parameters:
      priority - Priority to set
      Returns:
      the Event Handler
    • ignoreCancelled

      public LambdaEventHandler<T> ignoreCancelled(boolean ignoreCancelled)
      Set if the handler should ignore cancelled events Defaults to True
      Parameters:
      ignoreCancelled - set true to ignore cancelled events
      Returns:
      the Event Handler
    • execute

      public void execute(T event)
      Execute the EventHandler with an Event
      Specified by:
      execute in class EventHandler<T extends GeyserEvent>
      Parameters:
      event - Event passed to handler
    • getConsumer

      public BiConsumer<T,​EventHandler<T>> getConsumer()
    • getPriority

      public int getPriority()
      Description copied from class: EventHandler
      Return our priority
      Specified by:
      getPriority in class EventHandler<T extends GeyserEvent>
      Returns:
      the priority
    • isIgnoreCancelled

      public boolean isIgnoreCancelled()