Check for null server ip on Fabric (#3842)

This commit is contained in:
Konicai 2023-06-08 23:29:46 -04:00 committed by GitHub
parent f9870ac4ce
commit d6e095424c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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