Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plugin/src/main/java/net/elytrium/limboapi/LimboAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}

Expand Down