Package net.dv8tion.jda.api.hooks
Class AnnotatedEventManager
java.lang.Object
net.dv8tion.jda.api.hooks.AnnotatedEventManager
- All Implemented Interfaces:
- IEventManager
Implementation for 
IEventManager
 which checks for SubscribeEvent annotations on both
 static and member methods.
 Listeners for this manager do not need to implement EventListener
 
Example
 
 public class Foo
 {
    @SubscribeEvent
     public void onMsg(MessageReceivedEvent event)
     {
         System.out.printf("%s: %s\n", event.getAuthor().getName(), event.getMessage().getContentDisplay());
     }
 }
 - See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionThe currently registered listenersvoidhandle(GenericEvent event) Handles the providedGenericEvent.voidRegisters the specified listener
 Accepted types may be specified by implementationsvoidunregister(Object listener) Removes the specified listener
- 
Constructor Details- 
AnnotatedEventManagerpublic AnnotatedEventManager()
 
- 
- 
Method Details- 
registerDescription copied from interface:IEventManagerRegisters the specified listener
 Accepted types may be specified by implementations- Specified by:
- registerin interface- IEventManager
- Parameters:
- listener- A listener object
 
- 
unregisterDescription copied from interface:IEventManagerRemoves the specified listener- Specified by:
- unregisterin interface- IEventManager
- Parameters:
- listener- The listener object to remove
 
- 
getRegisteredListenersDescription copied from interface:IEventManagerThe currently registered listeners- Specified by:
- getRegisteredListenersin interface- IEventManager
- Returns:
- A list of listeners that have already been registered
 
- 
handleDescription copied from interface:IEventManagerHandles the providedGenericEvent.
 How this is handled is specified by the implementation.An implementation should not throw exceptions. - Specified by:
- handlein interface- IEventManager
- Parameters:
- event- The event to handle
 
 
-