Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-26 00:00:41 +01:00
Replace ; with : in motd/submotd (#3389)
Dieser Commit ist enthalten in:
Ursprung
592b48dbf5
Commit
b1d832dded
@ -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()) {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren