From 6cc092cc8e9759b7643bb6b16ffabbfc5d6cd3a4 Mon Sep 17 00:00:00 2001 From: byquanton <32410361+byquanton@users.noreply.github.com> Date: Sat, 9 Oct 2021 18:47:10 +0000 Subject: [PATCH] Fixed loadFloodgate method (#31) Upstream Commit 7cd3eb99ef2e44e8ac2cc4741df2d3ca9ced5946 broke it --- .../geysermc/platform/fabric/GeyserFabricConfiguration.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/bootstrap/fabric/src/main/java/org/geysermc/platform/fabric/GeyserFabricConfiguration.java b/bootstrap/fabric/src/main/java/org/geysermc/platform/fabric/GeyserFabricConfiguration.java index f3b446760..e0ee61aa5 100644 --- a/bootstrap/fabric/src/main/java/org/geysermc/platform/fabric/GeyserFabricConfiguration.java +++ b/bootstrap/fabric/src/main/java/org/geysermc/platform/fabric/GeyserFabricConfiguration.java @@ -32,7 +32,6 @@ import org.geysermc.connector.FloodgateKeyLoader; import org.geysermc.connector.configuration.GeyserJacksonConfiguration; import java.nio.file.Path; -import java.util.Optional; public class GeyserFabricConfiguration extends GeyserJacksonConfiguration { @JsonIgnore @@ -40,9 +39,9 @@ public class GeyserFabricConfiguration extends GeyserJacksonConfiguration { public void loadFloodgate(GeyserFabricMod geyser, ModContainer floodgate) { Path geyserDataFolder = geyser.getConfigFolder(); - Path floodgateDataFolder = FabricLoader.getInstance().getConfigDir().resolve("floodgate"); + Path floodgateDataFolder = floodgate != null ? FabricLoader.getInstance().getConfigDir().resolve("floodgate") : null; - floodgateKeyPath = FloodgateKeyLoader.getKeyPath(this, floodgate, floodgateDataFolder, geyserDataFolder, geyser.getGeyserLogger()); + floodgateKeyPath = FloodgateKeyLoader.getKeyPath(this, floodgateDataFolder, geyserDataFolder, geyser.getGeyserLogger()); } @Override