3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-26 16:12:46 +01:00

Suppress address in bind log if it is 0.0.0.0 (#4160)

Co-authored-by: onebeastchris <github@onechris.mozmail.com>
Dieser Commit ist enthalten in:
Konicai 2024-08-06 18:36:34 -05:00 committet von GitHub
Ursprung 83d8c19824
Commit 54c43f2b02
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: B5690EEEBB952194
2 geänderte Dateien mit 11 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -432,13 +432,18 @@ public class GeyserImpl implements GeyserApi, EventRegistrar {
this.geyserServer = new GeyserServer(this, bedrockThreadCount); this.geyserServer = new GeyserServer(this, bedrockThreadCount);
this.geyserServer.bind(new InetSocketAddress(config.getBedrock().address(), config.getBedrock().port())) this.geyserServer.bind(new InetSocketAddress(config.getBedrock().address(), config.getBedrock().port()))
.whenComplete((avoid, throwable) -> { .whenComplete((avoid, throwable) -> {
String address = config.getBedrock().address();
String port = String.valueOf(config.getBedrock().port()); // otherwise we get commas
if (throwable == null) { if (throwable == null) {
logger.info(GeyserLocale.getLocaleStringLog("geyser.core.start", config.getBedrock().address(), if ("0.0.0.0".equals(address)) {
String.valueOf(config.getBedrock().port()))); // basically just hide it in the log because some people get confused and try to change it
logger.info(GeyserLocale.getLocaleStringLog("geyser.core.start.ip_suppressed", port));
} else {
logger.info(GeyserLocale.getLocaleStringLog("geyser.core.start", address, port));
}
} else { } else {
String address = config.getBedrock().address(); logger.severe(GeyserLocale.getLocaleStringLog("geyser.core.fail", address, port));
int port = config.getBedrock().port();
logger.severe(GeyserLocale.getLocaleStringLog("geyser.core.fail", address, String.valueOf(port)));
if (!"0.0.0.0".equals(address)) { if (!"0.0.0.0".equals(address)) {
logger.info(Component.text("Suggestion: try setting `address` under `bedrock` in the Geyser config back to 0.0.0.0", NamedTextColor.GREEN)); logger.info(Component.text("Suggestion: try setting `address` under `bedrock` in the Geyser config back to 0.0.0.0", NamedTextColor.GREEN));
logger.info(Component.text("Then, restart this server.", NamedTextColor.GREEN)); logger.info(Component.text("Then, restart this server.", NamedTextColor.GREEN));

@ -1 +1 @@
Subproject commit 60b20023a92f084aba895ab0336e70fa7fb311fb Subproject commit a943a1bb910f58caa61f14bafacbc622bd48a694