Skip to content

Fix pre-limbo profile request plugins (e.g. Floodgate) being lost after /velocity reload - #274

Open
bhanu20-00 wants to merge 1 commit into
Elytrium:masterfrom
bhanu20-00:master
Open

Fix pre-limbo profile request plugins (e.g. Floodgate) being lost after /velocity reload#274
bhanu20-00 wants to merge 1 commit into
Elytrium:masterfrom
bhanu20-00:master

Conversation

@bhanu20-00

Copy link
Copy Markdown

What

Re-invoke EventManagerHook#reloadHandlers() at the end of LimboAPI#reload().

Why

/velocity reload calls unregisterListeners() and then re-registers listeners on a new EventManagerHook. Plugins that hoist a GameProfileRequestEvent handler at proxy boot via postProxyInitialization() (e.g. Floodgate, to detect Bedrock players before they reach limbo) had that handler attached to the old hook, which reload throws away. The new hook starts with empty handler state, so those handlers are never re-attached — Bedrock/Floodgate players silently stop being auto-authenticated and get forced through the normal register/login flow, until the proxy is fully restarted.

Fix

After reload() creates the new EventManagerHook and re-registers ReloadListener, call eventManagerHook.reloadHandlers() so pre-limbo profile-request plugin handlers get re-hoisted onto the new hook — matching the state at proxy boot.

… reload

reload() replaces eventManagerHook with a brand new instance and calls
eventManager.unregisterListeners(this) to drop the old one, but only
postProxyInitialization() ever calls reloadHandlers() to re-hoist
pre-limbo profile request plugins (e.g. Floodgate) ahead of LimboAPI's
own listener. Since that hook only runs once at boot, every
/velocity reload permanently loses Floodgate's GameProfileRequestEvent
handler: it was already pulled out of Velocity's normal dispatch list
by the old hook and never gets put back, and the freshly constructed
hook never re-discovers it.

Net effect: after any /velocity reload, Bedrock/Floodgate players stop
being recognized as such by downstream plugins (e.g. LimboAuth), and
get treated as regular offline-mode players until the proxy is fully
restarted.

Fix: call reloadHandlers() again after re-registering the new
eventManagerHook inside reload(), same as postProxyInitialization()
already does at boot.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant