Java API
class

EventSignalRegistry

me.tamkungz.signals.bukkit.internal.EventSignalRegistry

Version
0.2.1-SNAPSHOT
Java
21
Source file
me/tamkungz/signals/bukkit/internal/EventSignalRegistry.java
Repository
View source ↗

Registers one Bukkit listener per event type, priority and cancellation mode, and caches the

{@link Signal} each of them feeds.

<p>

Internal: use {@code BukkitSignals} instead.

public final class EventSignalRegistry

Constructors 1

EventSignalRegistry

public EventSignalRegistry(Plugin plugin, SignalBus bus)

Creates a registry that registers Bukkit listeners for a plugin and fires onto a bus.

@param
plugin plugin that owns the Bukkit listeners
@param
bus bus the signals live on

Methods 1

signal

public <T extends Event> Signal<T> signal(Class<T> eventType, EventPriority priority, boolean ignoreCancelled)

Returns the signal for an event type with the given options, registering the Bukkit listener on first use.

@param
eventType Bukkit event type
@param
priority priority the Bukkit listener runs at
@param
ignoreCancelled whether cancelled events are skipped
@param
<T> event type
@return
the signal for that combination