geforkt von Mirrors/Paper
[SPIGOT-950] Make handlerList requirement really obvious.
By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Ursprung
bb8989b928
Commit
ac203b1dbf
@ -5,6 +5,8 @@ import org.bukkit.plugin.PluginManager;
|
|||||||
/**
|
/**
|
||||||
* Represents an event.
|
* Represents an event.
|
||||||
*
|
*
|
||||||
|
* All events require a static method named getHandlerList() which returns the same {@link HandlerList} as {@link #getHandlers()}.
|
||||||
|
*
|
||||||
* @see PluginManager#callEvent(Event)
|
* @see PluginManager#callEvent(Event)
|
||||||
* @see PluginManager#registerEvents(Listener,Plugin)
|
* @see PluginManager#registerEvents(Listener,Plugin)
|
||||||
*/
|
*/
|
||||||
|
@ -582,7 +582,7 @@ public final class SimplePluginManager implements PluginManager {
|
|||||||
&& Event.class.isAssignableFrom(clazz.getSuperclass())) {
|
&& Event.class.isAssignableFrom(clazz.getSuperclass())) {
|
||||||
return getRegistrationClass(clazz.getSuperclass().asSubclass(Event.class));
|
return getRegistrationClass(clazz.getSuperclass().asSubclass(Event.class));
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalPluginAccessException("Unable to find handler list for event " + clazz.getName());
|
throw new IllegalPluginAccessException("Unable to find handler list for event " + clazz.getName() + ". Static getHandlerList method required!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren