Class EventSignalRegistry

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

public final class EventSignalRegistry extends Object
Registers one Bukkit listener per event type, priority and cancellation mode, and caches the Signal each of them feeds.

Internal: use BukkitSignals instead.

  • Constructor Summary

    Constructors
    Constructor
    Description
    EventSignalRegistry(org.bukkit.plugin.Plugin plugin, me.tamkungz.signals.SignalBus bus)
    Creates a registry that registers Bukkit listeners for a plugin and fires onto a bus.
  • Method Summary

    Modifier and Type
    Method
    Description
    <T extends org.bukkit.event.Event>
    me.tamkungz.signals.Signal<T>
    signal(Class<T> eventType, org.bukkit.event.EventPriority priority, boolean ignoreCancelled)
    Returns the signal for an event type with the given options, registering the Bukkit listener on first use.

    Methods inherited from class java.lang.Object

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

    • EventSignalRegistry

      public EventSignalRegistry(org.bukkit.plugin.Plugin plugin, me.tamkungz.signals.SignalBus bus)
      Creates a registry that registers Bukkit listeners for a plugin and fires onto a bus.
      Parameters:
      plugin - plugin that owns the Bukkit listeners
      bus - bus the signals live on
  • Method Details

    • signal

      public <T extends org.bukkit.event.Event> me.tamkungz.signals.Signal<T> signal(Class<T> eventType, org.bukkit.event.EventPriority priority, boolean ignoreCancelled)
      Returns the signal for an event type with the given options, registering the Bukkit listener on first use.
      Type Parameters:
      T - event type
      Parameters:
      eventType - Bukkit event type
      priority - priority the Bukkit listener runs at
      ignoreCancelled - whether cancelled events are skipped
      Returns:
      the signal for that combination