Interface Event<E>

All Known Implementing Classes:
EventImpl

public interface Event<E>
  • Method Details

    • subscribe

      void subscribe(String modId, Consumer<E> listener)
      Permanently Registered listeners.
      Parameters:
      modId - - the mod id.
      listener - - the listener.
    • subscribe

      void subscribe(Object subscriber, String modId, Consumer<E> listener)
      When using this method, you can unsubscribe to this event.
      Parameters:
      subscriber - - the subscribing object, used as the key for unsubscribing.
      modId - - the mod id.
      listener - - the listener.
    • unsubscribe

      void unsubscribe(Object subscriber, String modId) throws ConcurrentModificationException
      Parameters:
      subscriber - - the subscribing object, used as the key for unsubscribing.
      modId - - the mod id.
      Throws:
      ConcurrentModificationException