mirror of
https://hub.spigotmc.org/stash/scm/spigot/bukkit.git
synced 2025-08-21 05:44:17 +00:00
[SPIGOT-950] Make handlerList requirement really obvious.
This commit is contained in:
parent
958a8d04a6
commit
a5af83911d
2 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,8 @@ import org.bukkit.plugin.PluginManager;
|
|||
/**
|
||||
* 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#registerEvents(Listener,Plugin)
|
||||
*/
|
||||
|
|
|
@ -582,7 +582,7 @@ public final class SimplePluginManager implements PluginManager {
|
|||
&& 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());
|
||||
throw new IllegalPluginAccessException("Unable to find handler list for event " + clazz.getName() + ". Static getHandlerList method required!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue