Class EventHooks


  • public class EventHooks
    extends java.lang.Object
    Provides static methods for dealing with EventHook instances, including methods to register and unregister those that Obsidian should use.
    Since:
    4.5
    • Constructor Summary

      Constructors 
      Constructor Description
      EventHooks()  
    • Constructor Detail

      • EventHooks

        public EventHooks()
    • Method Detail

      • getEventHooks

        public static java.util.Collection<EventHook> getEventHooks()
        Returns all registered EventHook instances that are used when notification events fire.
        Returns:
        a thread-safe, unmodifiable list
      • register

        public static void register​(EventHook hook)
        Add the given EventHook and so it will be used for future notifications. These registrations will live as long as the JVM is up, unless modified via this method, remove(EventHook) and clearEventHooks().
      • remove

        public static void remove​(EventHook hook)
        Remove the given EventHook and stop it from being used for notifications.
      • clearEventHooks

        public static void clearEventHooks()
        Clears all registered EventHook instances.