Enum Class EventPriority

All Implemented Interfaces:
Serializable, Comparable<EventPriority>, Constable

public enum EventPriority extends Enum<EventPriority>
Represents an event's priority in execution.

Listeners with lower priority are called first will listeners with higher priority are called last.

Listeners are called in following order: LOWEST -> LOW -> NORMAL -> HIGH -> HIGHEST -> MONITOR

  • Enum Constant Details

    • LOWEST

      public static final EventPriority LOWEST
      Event call is of very low importance and should be run first, to allow other plugins to further customise the outcome
    • LOW

      public static final EventPriority LOW
      Event call is of low importance
    • NORMAL

      public static final EventPriority NORMAL
      Event call is neither important nor unimportant, and may be run normally
    • HIGH

      public static final EventPriority HIGH
      Event call is of high importance

      public static final EventPriority HIGHEST
      Event call is critical and must have the final say in what happens to the event

      public static final EventPriority MONITOR
      Event is listened to purely for monitoring the outcome of an event.

      No modifications to the event should be made under this priority

  • Method Details

    • values

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

      public static EventPriority 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.)
      name - the name of the enum constant to be returned.
      the enum constant with the specified name
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getSlot

      public int getSlot()