From 6ab442d68170248d46c8955a93acc55789f3ebe2 Mon Sep 17 00:00:00 2001 From: 4drian3d Date: Wed, 27 Oct 2021 07:22:42 -0500 Subject: [PATCH] Fix startup if fastlogin is not present --- .../glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java | 4 +++- proxy/src/main/resources/velocity-plugin.json | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) 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 8841c20..4438b55 100644 --- a/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java +++ b/proxy/src/main/java/com/glyart/authmevelocity/proxy/AuthMeVelocityPlugin.java @@ -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")); diff --git a/proxy/src/main/resources/velocity-plugin.json b/proxy/src/main/resources/velocity-plugin.json index 7930227..a537d3e 100644 --- a/proxy/src/main/resources/velocity-plugin.json +++ b/proxy/src/main/resources/velocity-plugin.json @@ -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" }