public enum Order extends Enum<Order>
Listener
d methods may be registered at.
Event handlers are called the order given in the following table.
Order | Read Only | Cancellation Allowed | Recommendation |
PRE | YES | NO | Initialisation and registration actions |
AFTER_PRE | YES | NO | Immediate responses to actions in PRE |
FIRST | YES | YES | Cancellation by protection plugins for informational purposes |
EARLY | NO | YES | Standard actions that should happen before other plugins react to the event |
DEFAULT | NO | YES | The default action order |
LATE | NO | YES | Standard actions that should happen after other plugins react to the event |
LAST | YES | YES | Final cancellation by protection plugins |
BEFORE_POST | YES | NO | Actions that need to respond to cancelled events before POST |
POST | YES | NO | Actions that need to react to the final and stable effects of event |
Enum Constant and Description |
---|
AFTER_PRE
The order point of AFTER_PRE handles things that need to be done after
PRE AFTER_PRE is read only and cannot cancel the events.
|
BEFORE_POST
The order point of BEFORE_POST handles preparation for things needing
to be done in post BEFORE_POST is read only and cannot cancel events.
|
DEFAULT
The order point of DEFAULT handles just standard event handlings, you
should use this unless you know you need otherwise DEFAULT is not read
only and can cancel events.
|
EARLY
The order point of EARLY handles standard actions that need to be done
before other plugins EARLY is not read only and can cancel events.
|
FIRST
The order point of FIRST handles cancellation by protection plugins for
informational responses FIRST is read only but can cancel events.
|
LAST
The order point of LAST handles last minute cancellations by protection
plugins LAST is read only but can cancel events.
|
LATE
The order point of LATE handles standard actions that need to be done
after other plugins LATE is not read only and can cancel the event.
|
POST
The order point of POST handles last minute things and monitoring
of events for rollback or logging POST is read only and
cannot cancel events.
|
PRE
The order point of PRE handles setting up things that need to be done
before other things are handled PRE is read only and cannot cancel the
events.
|
Modifier and Type | Method and Description |
---|---|
static Order |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Order[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final Order PRE
public static final Order AFTER_PRE
public static final Order FIRST
public static final Order EARLY
public static final Order DEFAULT
public static final Order LATE
public static final Order LAST
public static final Order BEFORE_POST
public static final Order POST
public static Order[] values()
for (Order c : Order.values()) System.out.println(c);
public static Order valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null