From 3395a5410403920d6bac896bc130d2a42faacc9c Mon Sep 17 00:00:00 2001 From: 4drian3d Date: Wed, 27 Jul 2022 16:23:27 +0000 Subject: [PATCH] fix: Clear listeners list on unregister --- .../com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java | 1 + 1 file changed, 1 insertion(+) diff --git a/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java b/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java index de40a4b..70f1cb3 100644 --- a/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java +++ b/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java @@ -105,6 +105,7 @@ public class AuthMeVelocityPlugin { proxy.getChannelRegistrar().register(AUTHMEVELOCITY_CHANNEL); listeners.forEach(listener -> proxy.getEventManager().unregisterListener(this, listener)); + listeners.clear(); listeners.add(new ProxyListener(config, api, logger, proxy)); listeners.add(new PluginMessageListener(proxy, logger, config, api));