From 7d14d079eff8c2f9924fe6478b2246565cabcacb Mon Sep 17 00:00:00 2001 From: RednedEpic Date: Thu, 2 Jan 2020 12:37:30 -0600 Subject: [PATCH] Fix NPE with ServerInfo being null for ping passthrough --- .../geysermc/connector/network/ConnectorServerEventHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/ConnectorServerEventHandler.java b/connector/src/main/java/org/geysermc/connector/network/ConnectorServerEventHandler.java index e8d0d9d1..d460f585 100644 --- a/connector/src/main/java/org/geysermc/connector/network/ConnectorServerEventHandler.java +++ b/connector/src/main/java/org/geysermc/connector/network/ConnectorServerEventHandler.java @@ -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());