Class EventSignalRegistry
java.lang.Object
me.tamkungz.signals.bukkit.internal.EventSignalRegistry
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
ConstructorsConstructorDescriptionEventSignalRegistry(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 TypeMethodDescription<T extends org.bukkit.event.Event>
me.tamkungz.signals.Signal<T> Returns the signal for an event type with the given options, registering the Bukkit listener on first use.
-
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 listenersbus- 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 typepriority- priority the Bukkit listener runs atignoreCancelled- whether cancelled events are skipped- Returns:
- the signal for that combination
-