Annotation Interface SubscribeEvent


@Retention(RUNTIME) @Target(METHOD) public @interface SubscribeEvent
Annotation required on methods to be identified as a valid EventBus subscriber event handler method.
Since:
2.1
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Contains priority values for priority().
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    An optional priority parameter.
    int
    An alternative numeric value for the priority parameter.
  • Element Details

    • priority

      An optional priority parameter. Default: SubscribeEvent.Priority.NORMAL.
      Returns:
      The priority value
      Default:
      NORMAL
    • priorityNum

      int priorityNum
      An alternative numeric value for the priority parameter. If this value is set to anything other than the numeric value of SubscribeEvent.Priority.NORMAL (the default), it takes precendence over priority(); otherwise, the numeric value of priority() is used.
      Returns:
      The custom numeric priority
      Since:
      2.11.0
      Default:
      1073741823