Ejemplo n.º 1
0
 /**
  * Unregister a specific listener from all handler lists.
  *
  * @param listener listener to unregister
  */
 public static void unregisterAll(Listener listener) {
   synchronized (allLists) {
     for (HandlerList h : allLists) {
       h.unregister(listener);
     }
   }
 }
Ejemplo n.º 2
0
 /**
  * Unregister a specific plugin's listeners from all handler lists.
  *
  * @param plugin plugin to unregister
  */
 public static void unregisterAll(EventPlugin plugin) {
   synchronized (allLists) {
     for (HandlerList h : allLists) {
       h.unregister(plugin);
     }
   }
 }
Ejemplo n.º 3
0
 /**
  * Bake all handler lists. Best used just after all normal event registration is complete, ie just
  * after all plugins are loaded if you're using fevents in a plugin system.
  */
 public static void bakeAll() {
   synchronized (allLists) {
     for (HandlerList h : allLists) {
       h.bake();
     }
   }
 }
Ejemplo n.º 4
0
 /** Unregister all listeners from all handler lists. */
 public static void unregisterAll() {
   synchronized (allLists) {
     for (HandlerList h : allLists) {
       synchronized (h) {
         for (List<RegisteredListener> list : h.handlerslots.values()) {
           list.clear();
         }
         h.handlers = null;
       }
     }
   }
 }