Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-12-27 00:23:03 +01:00
Merge remote-tracking branch 'origin/master'
Dieser Commit ist enthalten in:
Commit
0a3a4a9ee1
@ -66,8 +66,12 @@ public class ConnectorServerEventHandler implements BedrockServerEventHandler {
|
|||||||
pong.setVersion(GeyserConnector.BEDROCK_PACKET_CODEC.getMinecraftVersion());
|
pong.setVersion(GeyserConnector.BEDROCK_PACKET_CODEC.getMinecraftVersion());
|
||||||
pong.setIpv4Port(config.getBedrock().getPort());
|
pong.setIpv4Port(config.getBedrock().getPort());
|
||||||
if (connector.getConfig().isPingPassthrough() && serverInfo != null) {
|
if (connector.getConfig().isPingPassthrough() && serverInfo != null) {
|
||||||
pong.setMotd(MessageUtils.getBedrockMessage(serverInfo.getDescription()));
|
String[] motd = MessageUtils.getBedrockMessage(serverInfo.getDescription()).split("\n");
|
||||||
pong.setSubMotd(config.getBedrock().getMotd2());
|
String mainMotd = motd[0]; // First line of the motd.
|
||||||
|
String subMotd = (motd.length != 1) ? motd[1] : ""; // Second line of the motd if present, otherwise blank.
|
||||||
|
|
||||||
|
pong.setMotd(mainMotd.trim());
|
||||||
|
pong.setSubMotd(subMotd.trim()); // Trimmed to shift it to the left, prevents the universe from collapsing on us just because we went 2 characters over the text box's limit.
|
||||||
pong.setPlayerCount(serverInfo.getPlayerInfo().getOnlinePlayers());
|
pong.setPlayerCount(serverInfo.getPlayerInfo().getOnlinePlayers());
|
||||||
pong.setMaximumPlayerCount(serverInfo.getPlayerInfo().getMaxPlayers());
|
pong.setMaximumPlayerCount(serverInfo.getPlayerInfo().getMaxPlayers());
|
||||||
} else {
|
} else {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren