Fix startup if fastlogin is not present

This commit is contained in:
4drian3d 2021-10-27 07:22:42 -05:00
parent c1b18455d0
commit 6ab442d681
2 changed files with 9 additions and 2 deletions

View File

@ -37,7 +37,9 @@ public class AuthMeVelocityPlugin {
new LegacyChannelIdentifier("authmevelocity:main"),
MinecraftChannelIdentifier.create("authmevelocity", "main"));
proxy.getEventManager().register(this, new ProxyListener(proxy, logger));
proxy.getEventManager().register(this, new FastLoginListener(proxy));
if(proxy.getPluginManager().getPlugin("fastlogin").isPresent()){
proxy.getEventManager().register(this, new FastLoginListener(proxy));
}
AuthMeConfig.defaultConfig();
logger.info("-- AuthMeVelocity enabled --");
logger.info("AuthServers: " + config.getList("authservers"));

View File

@ -5,6 +5,11 @@
"url":"https://github.com/4drian3d/AuthMeVelocity",
"description":"This plugin adds the support for AuthMeReloaded to Velocity.",
"authors":["xQuickGlare"],
"dependencies":[],
"dependencies":[
{
"id":"fastlogin",
"optional":true
}
],
"main":"com.glyart.authmevelocity.proxy.AuthMeVelocityPlugin"
}