Fix nonsensical deprecation for specifying listener priority (#1491)

* Fix nonsensical deprecation for specifying listener priority

* Fix checkstyle error
This commit is contained in:
Henri Schubin
2025-01-21 19:37:20 +02:00
committed by GitHub
parent 71feb11b2e
commit 7392cd6574
3 changed files with 12 additions and 6 deletions

View File

@@ -12,6 +12,14 @@ package com.velocitypowered.api.event;
*/
public enum PostOrder {
FIRST, EARLY, NORMAL, LATE, LAST, CUSTOM
FIRST, EARLY, NORMAL, LATE, LAST,
/**
* Previously used to specify that {@link Subscribe#priority()} should be used.
*
* @deprecated No longer required, you only need to specify {@link Subscribe#priority()}.
*/
@Deprecated
CUSTOM
}

View File

@@ -32,12 +32,9 @@ public @interface Subscribe {
* The priority of this event handler. Priorities are used to determine the order in which event
* handlers are called. The higher the priority, the earlier the event handler will be called.
*
* <p>Note that due to compatibility constraints, you must specify {@link PostOrder#CUSTOM}
* in order to use this field.</p>
*
* @return the priority
*/
short priority() default Short.MIN_VALUE;
short priority() default 0;
/**
* Whether the handler must be called asynchronously. By default, all event handlers are called