Enum Class PacketListenerPriority
java.lang.Object
java.lang.Enum<PacketListenerPriority>
com.github.retrooper.packetevents.event.PacketListenerPriority
- All Implemented Interfaces:
Serializable
,Comparable<PacketListenerPriority>
,Constable
The priority of packet listeners affect the order they will be invoked in.
The lowest priority listeners are invoked first, the most high ones are invoked last.
The most high priority listener has the final decider on an event being cancelled.
This priority can be specified in the PacketListenerAbstract constructor.
If you don't specify a priority in the constructor, it will use the
NORMAL
priority.- Since:
- 1.8
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionListener is of high importance.Listener is of critical importance and wants to decide the cancellation of an event.Listener is of low importance.Listener is of very low importance.Listener is purely trying to decide the cancellation of an event.Default listener priority. -
Method Summary
Modifier and TypeMethodDescriptionstatic PacketListenerPriority
getById
(byte id) byte
getId()
static PacketListenerPriority
Returns the enum constant of this class with the specified name.static PacketListenerPriority[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
LOWEST
Listener is of very low importance. This listener will be ran first. -
LOW
Listener is of low importance. -
NORMAL
Default listener priority. Listener is neither important nor unimportant and may run normally. -
HIGH
Listener is of high importance. -
HIGHEST
Listener is of critical importance and wants to decide the cancellation of an event. -
MONITOR
Listener is purely trying to decide the cancellation of an event. This listener should be ran last.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getById
-
getId
public byte getId()
-