Replace ; with : in motd/submotd
@@ -125,13 +125,9 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
pong.setSubMotd(config.getBedrock().secondaryMotd());
}
- if (config.isPassthroughPlayerCounts() && pingInfo != null) {
- pong.setPlayerCount(pingInfo.getPlayers().getOnline());
- pong.setMaximumPlayerCount(pingInfo.getPlayers().getMax());
- } else {
- pong.setPlayerCount(geyser.getSessionManager().getSessions().size());
- pong.setMaximumPlayerCount(config.getMaxPlayers());
- }
+ // https://github.com/GeyserMC/Geyser/issues/3388
+ pong.setMotd(pong.getMotd().replace(';', ':'));
+ pong.setSubMotd(pong.getSubMotd().replace(';', ':'));
// Fallbacks to prevent errors and allow Bedrock to see the server
if (pong.getMotd() == null || pong.getMotd().isBlank()) {
@@ -160,6 +156,14 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
}
}
+ if (config.isPassthroughPlayerCounts() && pingInfo != null) {
+ pong.setPlayerCount(pingInfo.getPlayers().getOnline());
+ pong.setMaximumPlayerCount(pingInfo.getPlayers().getMax());
+ } else {
+ pong.setPlayerCount(geyser.getSessionManager().getSessions().size());
+ pong.setMaximumPlayerCount(config.getMaxPlayers());
+ }
+
//Bedrock will not even attempt a connection if the client thinks the server is full
//so we have to fake it not being full
if (pong.getPlayerCount() >= pong.getMaximumPlayerCount()) {
