geforkt von Mirrors/Paper
Added a default to EventHandler.priority()
Fixed HandlerList.unregisterAll() Fixed incorrect isAssignableFrom check in SimplePluginManager.getRegistrationClass() By: zml2008 <zach@zachsthings.com>
Dieser Commit ist enthalten in:
Ursprung
0251111b0d
Commit
0c50b9eeb1
@ -11,5 +11,5 @@ public @interface EventHandler {
|
||||
|
||||
Class<? extends Event> event();
|
||||
|
||||
EventPriority priority();
|
||||
EventPriority priority() default EventPriority.NORMAL;
|
||||
}
|
||||
|
@ -50,7 +50,9 @@ public class HandlerList {
|
||||
|
||||
public static void unregisterAll() {
|
||||
for (HandlerList h : alllists) {
|
||||
h.handlerslots.clear();
|
||||
for (List<RegisteredListener> list : h.handlerslots.values()) {
|
||||
list.clear();
|
||||
}
|
||||
h.baked = false;
|
||||
}
|
||||
}
|
||||
|
@ -471,7 +471,7 @@ public final class SimplePluginManager implements PluginManager {
|
||||
} catch (NoSuchMethodException e) {
|
||||
if (clazz.getSuperclass() != null
|
||||
&& !clazz.getSuperclass().equals(Event.class)
|
||||
&& clazz.getSuperclass().isAssignableFrom(Event.class)) {
|
||||
&& Event.class.isAssignableFrom(clazz.getSuperclass())) {
|
||||
return getRegistrationClass(clazz.getSuperclass().asSubclass(Event.class));
|
||||
} else {
|
||||
throw new IllegalPluginAccessException("Unable to find handler list for event " + clazz.getName());
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren