From d6e095424c7bd59bb5b5b74c576c0c7bef83c30e Mon Sep 17 00:00:00 2001 From: Konicai <71294714+Konicai@users.noreply.github.com> Date: Thu, 8 Jun 2023 23:29:46 -0400 Subject: [PATCH] Check for null server ip on Fabric (#3842) --- .../org/geysermc/geyser/platform/fabric/GeyserFabricMod.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java b/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java index fdc820b19..0b9bcea68 100644 --- a/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java +++ b/bootstrap/fabric/src/main/java/org/geysermc/geyser/platform/fabric/GeyserFabricMod.java @@ -217,10 +217,12 @@ public class GeyserFabricMod implements ModInitializer, GeyserBootstrap { return this.server.getServerVersion(); } + @SuppressWarnings("ConstantConditions") // IDEA thinks that ip cannot be null @NotNull @Override public String getServerBindAddress() { - return this.server.getLocalIp(); + String ip = this.server.getLocalIp(); + return ip != null ? ip : ""; // See issue #3812 } @Override