13
0
geforkt von Mirrors/Paper

[SPIGOT-950] Make handlerList requirement really obvious.

By: md_5 <git@md-5.net>
Dieser Commit ist enthalten in:
Bukkit/Spigot 2015-06-01 16:43:22 +10:00
Ursprung bb8989b928
Commit ac203b1dbf
2 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen

Datei anzeigen

@ -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)
*/

Datei anzeigen

@ -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!");
}
}
}