mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Merge branch 'master' into feature/1.21.20
This commit is contained in:
commit
5c617eb16f
2 changed files with 16 additions and 24 deletions
|
@ -156,12 +156,6 @@ public class GeyserImpl implements GeyserApi, EventRegistrar {
|
||||||
|
|
||||||
private final SessionManager sessionManager = new SessionManager();
|
private final SessionManager sessionManager = new SessionManager();
|
||||||
|
|
||||||
/**
|
|
||||||
* This is used in GeyserConnect to stop the bedrock server binding to a port
|
|
||||||
*/
|
|
||||||
@Setter
|
|
||||||
private static boolean shouldStartListener = true;
|
|
||||||
|
|
||||||
private FloodgateCipher cipher;
|
private FloodgateCipher cipher;
|
||||||
private FloodgateSkinUploader skinUploader;
|
private FloodgateSkinUploader skinUploader;
|
||||||
private NewsHandler newsHandler;
|
private NewsHandler newsHandler;
|
||||||
|
@ -435,24 +429,22 @@ public class GeyserImpl implements GeyserApi, EventRegistrar {
|
||||||
bedrockThreadCount = Math.max(1, SystemPropertyUtil.getInt("io.netty.eventLoopThreads", NettyRuntime.availableProcessors() * 2));
|
bedrockThreadCount = Math.max(1, SystemPropertyUtil.getInt("io.netty.eventLoopThreads", NettyRuntime.availableProcessors() * 2));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shouldStartListener) {
|
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) -> {
|
if (throwable == null) {
|
||||||
if (throwable == null) {
|
logger.info(GeyserLocale.getLocaleStringLog("geyser.core.start", config.getBedrock().address(),
|
||||||
logger.info(GeyserLocale.getLocaleStringLog("geyser.core.start", config.getBedrock().address(),
|
String.valueOf(config.getBedrock().port())));
|
||||||
String.valueOf(config.getBedrock().port())));
|
} else {
|
||||||
} else {
|
String address = config.getBedrock().address();
|
||||||
String address = config.getBedrock().address();
|
int port = config.getBedrock().port();
|
||||||
int port = config.getBedrock().port();
|
logger.severe(GeyserLocale.getLocaleStringLog("geyser.core.fail", address, String.valueOf(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));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}).join();
|
}
|
||||||
}
|
}).join();
|
||||||
|
|
||||||
if (config.getRemote().authType() == AuthType.FLOODGATE) {
|
if (config.getRemote().authType() == AuthType.FLOODGATE) {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -150,7 +150,7 @@ public class GeyserLocale {
|
||||||
} else {
|
} else {
|
||||||
if (!validLocalLanguage) {
|
if (!validLocalLanguage) {
|
||||||
// Don't warn on missing locales if a local file has been found
|
// Don't warn on missing locales if a local file has been found
|
||||||
bootstrap.getGeyserLogger().warning("Missing locale: " + locale);
|
bootstrap.getGeyserLogger().debug("Missing locale: " + locale);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue