Small changes

keep-around/d31701866686f66088b78de2e29736ae36e55a68
Pingex aka Raphaël 9 years ago
parent 73f350aacc
commit 975eab204d

@ -131,7 +131,7 @@ public class PluginLoader
{ {
PluginWrapper plugin = new PluginWrapper(clazz.asSubclass(IPlugin.class), classLoader); PluginWrapper plugin = new PluginWrapper(clazz.asSubclass(IPlugin.class), classLoader);
plugins.put(clazz.getAnnotation(Plugin.class).id(), plugin); plugins.put(clazz.getAnnotation(Plugin.class).id(), plugin);
LOGGER.debug("Plugin {} {} preloaded.", clazz.getAnnotation(Plugin.class).id(), clazz.getAnnotation(Plugin.class).version()); LOGGER.debug("Plugin {} version {} preloaded.", clazz.getAnnotation(Plugin.class).id(), clazz.getAnnotation(Plugin.class).version());
counter++; counter++;
CoreEventsHandler.pluginPreloaded(plugin); CoreEventsHandler.pluginPreloaded(plugin);
} }

@ -5,11 +5,13 @@ import java.util.Set;
/** /**
* Interface which indicates that the plugin has event handlers. * Interface which indicates that the plugin has event handlers.
*/ */
@FunctionalInterface
public interface IWithEventHandlers public interface IWithEventHandlers
{ {
/** /**
* Gives all event handlers classes for the plugin. * Gives all event handlers classes for the plugin.
* @return All events handlers to submit to D4J. * @return All events handlers to submit to D4J.
* TODO: Class -> Object
*/ */
Set<Class<?>> getEventHandlers(); Set<Class<?>> getEventHandlers();
} }