fix: Fixed multiple ChannelIdentifier registration

This commit is contained in:
4drian3d 2022-07-27 16:36:36 +00:00
parent 3395a54104
commit aead3e144c

View File

@ -58,6 +58,8 @@ public class AuthMeVelocityPlugin {
return; return;
} }
proxy.getChannelRegistrar().register(AUTHMEVELOCITY_CHANNEL);
if (proxy.getPluginManager().isLoaded("miniplaceholders")) { if (proxy.getPluginManager().isLoaded("miniplaceholders")) {
AuthmePlaceholders.getExpansion(this).register(); AuthmePlaceholders.getExpansion(this).register();
} }
@ -100,9 +102,9 @@ public class AuthMeVelocityPlugin {
if (toml == null) { if (toml == null) {
return false; return false;
} }
this.config = new AuthMeConfig(toml); this.config = new AuthMeConfig(toml);
this.api = new AuthmeVelocityAPI(this, config); this.api = new AuthmeVelocityAPI(this, config);
proxy.getChannelRegistrar().register(AUTHMEVELOCITY_CHANNEL);
listeners.forEach(listener -> proxy.getEventManager().unregisterListener(this, listener)); listeners.forEach(listener -> proxy.getEventManager().unregisterListener(this, listener));
listeners.clear(); listeners.clear();