Enum Class PostOrder

java.lang.Object
java.lang.Enum<PostOrder>
com.velocitypowered.api.event.PostOrder
All Implemented Interfaces:
Serializable, Comparable<PostOrder>, Constable

public enum PostOrder extends Enum<PostOrder>
Represents the order an event will be posted to a listener method, relative to other listeners.
  • Enum Constant Details

    • FIRST

      public static final PostOrder FIRST
      Indicates the listener should be invoked first, before any other listener. This order is suitable for listeners that must handle the event before others.
    • EARLY

      public static final PostOrder EARLY
      Indicates the listener should be invoked early, but after listeners with FIRST. This order is suitable for handling the event before most other listeners.
    • NORMAL

      public static final PostOrder NORMAL
      Indicates the listener should be invoked in the normal order of execution. This is the default and most commonly used order.
    • LATE

      public static final PostOrder LATE
      Indicates the listener should be invoked later in the execution order, after listeners with NORMAL. This order is suitable for listeners that should observe the results of earlier listeners.
    • LAST

      public static final PostOrder LAST
      Indicates the listener should be invoked last, after all other listeners. This order is suitable for listeners that should run only after all others have completed handling the event.
    • CUSTOM

      @Deprecated public static final PostOrder CUSTOM
      Deprecated.
      No longer required, you only need to specify Subscribe.priority().
      Previously used to specify that Subscribe.priority() should be used.
  • Method Details

    • values

      public static PostOrder[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PostOrder valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null