From cc673ce84cb71885c872264cebc86beb1053d3b5 Mon Sep 17 00:00:00 2001 From: bhanu20-00 <197298090+bhanu20-00@users.noreply.github.com> Date: Mon, 17 Aug 2026 15:27:15 +0530 Subject: [PATCH] Fix Floodgate GameProfileRequestEvent handler being lost on /velocity 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. --- .../src/main/java/net/elytrium/limboapi/LimboAPI.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java b/plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java index 1feb146f..8e6622bf 100644 --- a/plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java +++ b/plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java @@ -302,6 +302,17 @@ public void reload() { eventManager.register(this, new DisconnectListener(this)); eventManager.register(this, new ReloadListener(this)); + // Without this, the pre-limbo profile request plugins (e.g. Floodgate) hoisted at boot by + // postProxyInitialization() are lost on every /velocity reload: unregisterListeners() above drops the + // old EventManagerHook (and with it, the reference to their handler), and the new EventManagerHook + // created above starts with empty handler state, so those plugins' GameProfileRequestEvent handlers + // never get re-hoisted and simply stop firing until the proxy is fully restarted. + try { + this.eventManagerHook.reloadHandlers(); + } catch (IllegalAccessException e) { + LOGGER.error("Failed to reload pre-limbo profile request plugin handlers", e); + } + LOGGER.info("Loaded!"); }