From 425df396cb4922e1d14df1042d3ea4d7005abd63 Mon Sep 17 00:00:00 2001 From: Chase MacDonnell Date: Wed, 6 May 2020 17:02:52 -0400 Subject: [PATCH] Don't load floodgate if it isn't needed (velocity) (#499) Co-authored-by: Chase M <1860157-chasemacdonnell@users.noreply.gitlab.com> --- .../geysermc/platform/velocity/GeyserVelocityConfiguration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bootstrap/velocity/src/main/java/org/geysermc/platform/velocity/GeyserVelocityConfiguration.java b/bootstrap/velocity/src/main/java/org/geysermc/platform/velocity/GeyserVelocityConfiguration.java index ff99f8ab1..b9b3b3793 100644 --- a/bootstrap/velocity/src/main/java/org/geysermc/platform/velocity/GeyserVelocityConfiguration.java +++ b/bootstrap/velocity/src/main/java/org/geysermc/platform/velocity/GeyserVelocityConfiguration.java @@ -79,7 +79,7 @@ public class GeyserVelocityConfiguration implements GeyserConfiguration { public void loadFloodgate(GeyserVelocityPlugin plugin, ProxyServer proxyServer, File dataFolder) { Optional floodgate = proxyServer.getPluginManager().getPlugin("floodgate"); - floodgateKey = FloodgateKeyLoader.getKey(plugin.getGeyserLogger(), this, Paths.get(dataFolder.toString(), floodgateKeyFile.isEmpty() ? floodgateKeyFile : "public-key.pem"), floodgate.get(), Paths.get("plugins/floodgate/")); + floodgate.ifPresent(it -> floodgateKey = FloodgateKeyLoader.getKey(plugin.getGeyserLogger(), this, Paths.get(dataFolder.toString(), floodgateKeyFile.isEmpty() ? floodgateKeyFile : "public-key.pem"), it, Paths.get("plugins/floodgate/"))); } @Override