Class BungeeSignals
java.lang.Object
me.tamkungz.signals.bungee.BungeeSignals
- All Implemented Interfaces:
EventSignalSource
Small bridge from BungeeCord (and Waterfall) events to GEB-backed signals.
Common events are grouped by domain: players(), servers() and proxy(). Any other
bridged event type is available through on(Class).
BungeeCord can only register handlers by reflecting over annotated methods, so the bridge covers a fixed list
of events (see bridgedEvents()), all at NORMAL priority. For an event outside that list,
register a normal BungeeCord listener and fire into bus() yourself.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the BungeeCord event types this bridge forwards.me.tamkungz.signals.SignalBusbus()Returns the signal bus behind this bridge.static BungeeSignalscreate(net.md_5.bungee.api.plugin.Plugin plugin) Creates a bridge with its own signal bus.static BungeeSignalscreate(net.md_5.bungee.api.plugin.Plugin plugin, me.tamkungz.signals.SignalBus bus) Creates a bridge on an existing signal bus.<T extends net.md_5.bungee.api.plugin.Event>
me.tamkungz.signals.Signal<T> Returns the signal for a bridged BungeeCord event type.players()Returns shortcuts for player events.proxy()Returns shortcuts for proxy events.servers()Returns shortcuts for backend server events.static BungeeSignalsshared()Returns the bridge shared by every plugin through the installed SignalsLib plugin.static me.tamkungz.signals.SignalBusReturns the signal bus shared by every plugin through the installed SignalsLib plugin.
-
Method Details
-
create
Creates a bridge with its own signal bus.- Parameters:
plugin- plugin that owns the BungeeCord listener- Returns:
- a new bridge
-
create
public static BungeeSignals create(net.md_5.bungee.api.plugin.Plugin plugin, me.tamkungz.signals.SignalBus bus) Creates a bridge on an existing signal bus.- Parameters:
plugin- plugin that owns the BungeeCord listenerbus- bus the signals live on- Returns:
- a new bridge
-
bus
public me.tamkungz.signals.SignalBus bus()Returns the signal bus behind this bridge.- Returns:
- the signal bus
-
bridgedEvents
-
on
public <T extends net.md_5.bungee.api.plugin.Event> me.tamkungz.signals.Signal<T> on(Class<T> eventType) Description copied from interface:EventSignalSourceReturns the signal for a bridged BungeeCord event type.- Specified by:
onin interfaceEventSignalSource- Type Parameters:
T- event type- Parameters:
eventType- BungeeCord event type- Returns:
- the signal for that event type
-
players
-
servers
-
proxy
-