mirror of
https://github.com/GeyserMC/Geyser.git
synced 2025-12-28 03:09:08 +00:00
Fix NPE with ServerInfo being null for ping passthrough
This commit is contained in:
@@ -65,7 +65,7 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
|
||||
pong.setProtocolVersion(GeyserConnector.BEDROCK_1_14_PROTOCOL_VERSION);
|
||||
pong.setVersion(GeyserConnector.BEDROCK_PACKET_CODEC.getMinecraftVersion());
|
||||
pong.setIpv4Port(config.getBedrock().getPort());
|
||||
if (connector.getConfig().isPingPassthrough()) {
|
||||
if (connector.getConfig().isPingPassthrough() && serverInfo != null) {
|
||||
pong.setMotd(MessageUtils.getBedrockMessage(serverInfo.getDescription()));
|
||||
pong.setSubMotd(config.getBedrock().getMotd2());
|
||||
pong.setPlayerCount(serverInfo.getPlayerInfo().getOnlinePlayers());
|
||||
|
||||
Reference in New Issue
Block a user