Package org.spongepowered.api.event
Interface EventManager
public interface EventManager
Manages the registration of event listeners and the dispatching of events.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanCalls anEventto all listeners that listen to it.<E extends Event>
 EventManagerregisterListener(EventListenerRegistration<E> registration) Submits a newlistener registrationto this manager.registerListeners(org.spongepowered.plugin.PluginContainer plugin, Object obj) registerListeners(org.spongepowered.plugin.PluginContainer plugin, Object obj, MethodHandles.Lookup lookup) Un-registers an object from receivingEvents.
- 
Method Details- 
registerListenerSubmits a newlistener registrationto this manager.- Type Parameters:
- E- The event type
- Parameters:
- registration- The registration
- Returns:
- This manager, for fluency
 
- 
registerListenersRegistersEventmethods annotated with @Listenerin the specified object.This will not include any methods declared in supertypes, but will test for private and package-private listener methods. - Parameters:
- plugin- The plugin container
- obj- The object
- Returns:
- This manager, for fluency
 
- 
registerListenersEventManager registerListeners(org.spongepowered.plugin.PluginContainer plugin, Object obj, MethodHandles.Lookup lookup) RegistersEventmethods annotated with @Listenerin the specified object.This will not include any methods declared in supertypes, but will test for private and package-private listener methods. The provided lookup will be used for privileged access to the listener object. - Parameters:
- plugin- The plugin container
- obj- The object
- lookup- The lookup with which to access the listener object
- Returns:
- This manager, for fluency
 
- 
unregisterListenersUn-registers an object from receivingEvents.If the provided object is a plugin, all events associated with that plugin will be unregistered.- Parameters:
- obj- The object
- Returns:
- This manager, for fluency
 
- 
postCalls anEventto all listeners that listen to it.- Parameters:
- event- The event
- Returns:
- True if cancelled, false if not
 
 
-