Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/main/java/org/spongepowered/api/event/EventManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@

import org.spongepowered.plugin.PluginContainer;

import java.lang.invoke.MethodHandles;

/**
* Manages the registration of event listeners and the dispatching of events.
*/
Expand All @@ -52,6 +54,22 @@ public interface EventManager {
*/
EventManager registerListeners(PluginContainer plugin, Object obj);

/**
* Registers {@link Event} methods annotated with @{@link Listener} in the
* specified object.
*
* <p>This will not include any methods declared in supertypes, but will
* test for private and package-private listener methods.</p>
*
* <p>The provided lookup will be used for privileged access to the listener object.</p>
*
* @param plugin The plugin container
* @param obj The object
* @param lookup The lookup with which to access the listener object
* @return This manager, for fluency
*/
EventManager registerListeners(PluginContainer plugin, Object obj, MethodHandles.Lookup lookup);

/**
* Un-registers an object from receiving {@link Event}s.
*
Expand Down