Java API
class

BungeeSignals

me.tamkungz.signals.bungee.BungeeSignals

Version
0.2.1-SNAPSHOT
Java
21
Source file
me/tamkungz/signals/bungee/BungeeSignals.java
Repository
View source ↗

Small bridge from BungeeCord (and Waterfall) events to GEB-backed signals.

<p>

Common events are grouped by domain: {@link #players()}, {@link #servers()} and {@link #proxy()}. Any other

bridged event type is available through {@link #on(Class)}.

<p>

BungeeCord can only register handlers by reflecting over annotated methods, so the bridge covers a fixed list

of events (see {@link #bridgedEvents()}), all at {@code NORMAL} priority. For an event outside that list,

register a normal BungeeCord listener and fire into {@link #bus()} yourself.

public final class BungeeSignals implements EventSignalSource

Methods 10

create

public static BungeeSignals create(Plugin plugin)

Creates a bridge with its own signal bus.

@param
plugin plugin that owns the BungeeCord listener
@return
a new bridge

create

public static BungeeSignals create(Plugin plugin, SignalBus bus)

Creates a bridge on an existing signal bus.

@param
plugin plugin that owns the BungeeCord listener
@param
bus bus the signals live on
@return
a new bridge

shared

public static BungeeSignals shared()

Returns the bridge shared by every plugin through the installed SignalsLib plugin.

@return
the shared bridge

sharedBus

public static SignalBus sharedBus()

Returns the signal bus shared by every plugin through the installed SignalsLib plugin.

@return
the shared bus

bus

public SignalBus bus()

Returns the signal bus behind this bridge.

@return
the signal bus

bridgedEvents

public static Set<Class<? extends Event>> bridgedEvents()

Returns the BungeeCord event types this bridge forwards.

@return
an unmodifiable set of event types

on

@Override public <T extends Event> Signal<T> on(Class<T> eventType)

players

public PlayerSignals players()

Returns shortcuts for player events.

@return
player signals

servers

public ServerSignals servers()

Returns shortcuts for backend server events.

@return
server signals

proxy

public ProxySignals proxy()

Returns shortcuts for proxy events.

@return
proxy signals