3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-08-01 01:58:07 +02:00

Fix NPE with MOTD (#1921)

Dieser Commit ist enthalten in:
Camotoy 2021-02-12 14:16:29 -05:00 committet von GitHub
Ursprung 25dd651b09
Commit 98b2a0e51b
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -95,6 +95,13 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
pong.setMaximumPlayerCount(config.getMaxPlayers());
}
if (pong.getMotd() == null) {
pong.setMotd("");
}
if (pong.getSubMotd() == null) {
pong.setSubMotd("");
}
// The ping will not appear if the MOTD + sub-MOTD is of a certain length.
// We don't know why, though
byte[] motdArray = pong.getMotd().getBytes(StandardCharsets.UTF_8);