Annotation Interface Listener


@Retention(RUNTIME) @Target(METHOD) public @interface Listener
Used to annotate a method as an EventListener.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether this listener should be called before any other server mods, such as Forge mods.
    The order this listener should be called in relation to other listeners in the EventManager.
  • Element Details

    • order

      Order order
      The order this listener should be called in relation to other listeners in the EventManager.
      Returns:
      The order the listener should be called in
      Default:
      DEFAULT
    • beforeModifications

      boolean beforeModifications
      Whether this listener should be called before any other server mods, such as Forge mods. All Sponge event listeners are called after mods, unless they specify the #beforeModifications() flag to be true.
      Returns:
      If the listener should be fired before other server mods
      Default:
      false