Class EventSignalRegistry

java.lang.Object
me.tamkungz.signals.velocity.internal.EventSignalRegistry

public final class EventSignalRegistry extends Object
Registers one Velocity handler per event type and post order, and caches the Signal each of them feeds.

Internal: use VelocitySignals instead.

  • Constructor Summary

    Constructors
    Constructor
    Description
    EventSignalRegistry(Object plugin, com.velocitypowered.api.proxy.ProxyServer proxy, me.tamkungz.signals.SignalBus bus)
    Creates a registry that registers Velocity handlers for a plugin and fires onto a bus.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> me.tamkungz.signals.Signal<T>
    signal(Class<T> eventType, com.velocitypowered.api.event.PostOrder order)
    Returns the signal for an event type with the given post order, registering the Velocity handler on first use.

    Methods inherited from class Object

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

    • EventSignalRegistry

      public EventSignalRegistry(Object plugin, com.velocitypowered.api.proxy.ProxyServer proxy, me.tamkungz.signals.SignalBus bus)
      Creates a registry that registers Velocity handlers for a plugin and fires onto a bus.
      Parameters:
      plugin - plugin instance that owns the Velocity handlers
      proxy - the proxy whose event manager the handlers are registered on
      bus - bus the signals live on
  • Method Details

    • signal

      public <T> me.tamkungz.signals.Signal<T> signal(Class<T> eventType, com.velocitypowered.api.event.PostOrder order)
      Returns the signal for an event type with the given post order, registering the Velocity handler on first use.
      Type Parameters:
      T - event type
      Parameters:
      eventType - Velocity event type
      order - order in which the Velocity handler runs
      Returns:
      the signal for that combination