public class HandlerList extends Object
Constructor and Description |
---|
HandlerList()
Create a new handler list and initialize using EventPriority.
|
Modifier and Type | Method and Description |
---|---|
void |
bake()
Bake HashMap and ArrayLists to 2d array - does nothing if not necessary
|
static void |
bakeAll()
Bake all handler lists.
|
static ArrayList<HandlerList> |
getHandlerLists()
Get a list of all handler lists for every event type
|
RegisteredListener[] |
getRegisteredListeners()
Get the baked registered listeners associated with this handler list
|
static ArrayList<RegisteredListener> |
getRegisteredListeners(Plugin plugin)
Get a specific plugin's registered listeners associated with this
handler list
|
void |
register(RegisteredListener listener)
Register a new listener in this handler list
|
void |
registerAll(Collection<RegisteredListener> listeners)
Register a collection of new listeners in this handler list
|
void |
unregister(Listener listener)
Remove a specific listener from this handler
|
void |
unregister(Plugin plugin)
Remove a specific plugin's listeners from this handler
|
void |
unregister(RegisteredListener listener)
Remove a listener from a specific order slot
|
static void |
unregisterAll()
Unregister all listeners from all handler lists.
|
static void |
unregisterAll(Listener listener)
Unregister a specific listener from all handler lists.
|
static void |
unregisterAll(Plugin plugin)
Unregister a specific plugin's listeners from all handler lists.
|
public HandlerList()
The HandlerList is then added to meta-list for use in bakeAll()
public static void bakeAll()
public static void unregisterAll()
public static void unregisterAll(Plugin plugin)
plugin
- plugin to unregisterpublic static void unregisterAll(Listener listener)
listener
- listener to unregisterpublic void register(RegisteredListener listener)
listener
- listener to registerpublic void registerAll(Collection<RegisteredListener> listeners)
listeners
- listeners to registerpublic void unregister(RegisteredListener listener)
listener
- listener to removepublic void unregister(Plugin plugin)
plugin
- plugin to removepublic void unregister(Listener listener)
listener
- listener to removepublic void bake()
public RegisteredListener[] getRegisteredListeners()
public static ArrayList<RegisteredListener> getRegisteredListeners(Plugin plugin)
plugin
- the plugin to get the listeners ofpublic static ArrayList<HandlerList> getHandlerLists()
Copyright © 2017. All rights reserved.