Class SimpleEventBus

java.lang.Object
org.polyfrost.oneclient.common.SimpleEventBus
All Implemented Interfaces:
org.polyfrost.oneclient.api.event.EventBus

public final class SimpleEventBus extends Object implements org.polyfrost.oneclient.api.event.EventBus
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.polyfrost.oneclient.api.event.EventBus

    org.polyfrost.oneclient.api.event.EventBus.Subscription
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    post(org.polyfrost.oneclient.api.event.OneClientEvent event)
     
    <E extends org.polyfrost.oneclient.api.event.OneClientEvent>
    org.polyfrost.oneclient.api.event.EventBus.Subscription
    subscribe(Class<E> type, Consumer<? super E> listener)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • subscribe

      public <E extends org.polyfrost.oneclient.api.event.OneClientEvent> org.polyfrost.oneclient.api.event.EventBus.Subscription subscribe(Class<E> type, Consumer<? super E> listener)
      Specified by:
      subscribe in interface org.polyfrost.oneclient.api.event.EventBus
    • post

      public void post(org.polyfrost.oneclient.api.event.OneClientEvent event)