mirror of
https://github.com/GeyserMC/Geyser.git
synced 2024-08-14 23:57:35 +00:00
Fix NPE with MOTD (#1921)
This commit is contained in:
parent
25dd651b09
commit
98b2a0e51b
1 changed files with 7 additions and 0 deletions
|
@ -95,6 +95,13 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
|
||||||
pong.setMaximumPlayerCount(config.getMaxPlayers());
|
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.
|
// The ping will not appear if the MOTD + sub-MOTD is of a certain length.
|
||||||
// We don't know why, though
|
// We don't know why, though
|
||||||
byte[] motdArray = pong.getMotd().getBytes(StandardCharsets.UTF_8);
|
byte[] motdArray = pong.getMotd().getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
Loading…
Reference in a new issue