public class EventManager extends Object
| Modifier and Type | Class and Description | 
|---|---|
static class  | 
EventManager.HandleBasedListener  | 
static class  | 
EventManager.ReflectionBasedListener  | 
| Constructor and Description | 
|---|
EventManager()  | 
| Modifier and Type | Method and Description | 
|---|---|
static void | 
callEvent(Event ev)
Call an event 
 | 
static void | 
load()  | 
static void | 
registerEvent(Listeners src)
Add all event in the given class
 Warn: all registered event are removed when doing /negativity reload. 
 | 
static void | 
registerListener(ListenerCaller listener,
                Class<Event> paramEvent,
                EventListener eventListener)  | 
static void | 
unregisterEvent(Listeners src)
Remove all event for the specified instance 
 | 
static void | 
unregisterEventForClass(Class<?> clazz)
Remove all event for the specified class, including ALL instance 
 | 
public static void load()
public static void registerEvent(Listeners src)
src - the given object which contains event methodpublic static void unregisterEvent(Listeners src)
src - the instance that will not longer be in listenerpublic static void unregisterEventForClass(Class<?> clazz)
clazz - the class removedpublic static void registerListener(ListenerCaller listener, Class<Event> paramEvent, EventListener eventListener)
public static void callEvent(Event ev)
ev - the event which have to be called