Annotation Interface Event


@Target(METHOD) @Retention(RUNTIME) public @interface Event
An annotation to mark methods as being event handler methods
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether the event is called async by bukkit.
    boolean
    Whether the event handler method should ignore cancelled events.
    boolean
    If this event should be injected into the event bus.
    org.bukkit.event.EventPriority
    The priority of the event listener.
    int
    The priority of the event handler method.
  • Element Details

    • async

      boolean async
      Whether the event is called async by bukkit.
      Returns:
      true if the event is called async
      Default:
      false
    • priority

      int priority
      The priority of the event handler method. The lower the value the sooner your method will be called. Default value is 1000
      Returns:
      The priority of the event handler method.
      Default:
      1000
    • ignoreCancelled

      boolean ignoreCancelled
      Whether the event handler method should ignore cancelled events.
      Returns:
      true if the event handler method should ignore cancelled events.
      Default:
      true
    • inject

      boolean inject
      If this event should be injected into the event bus. Setting this to true will register a new event listener in bukkit and allow the EventHandler to listen to the event.
      Returns:
      true if the event should be injected into the event bus.
      Default:
      true
    • injectionPriority

      org.bukkit.event.EventPriority injectionPriority
      The priority of the event listener.
      Returns:
      The priority of the event listener.
      Default:
      NORMAL