3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-12-24 15:20:25 +01:00

Don't allow blank messages to be sent

Fixes #2546
Dieser Commit ist enthalten in:
Camotoy 2021-09-23 17:52:22 -04:00
Ursprung 27a17ff183
Commit 85a5762364
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 7EEFB66FE798081F

Datei anzeigen

@ -40,6 +40,11 @@ public class BedrockTextTranslator extends PacketTranslator<TextPacket> {
public void translate(GeyserSession session, TextPacket packet) { public void translate(GeyserSession session, TextPacket packet) {
String message = packet.getMessage(); String message = packet.getMessage();
if (message.isBlank()) {
// Java Edition (as of 1.17.1) just doesn't pass on these messages, so... we won't either!
return;
}
if (MessageTranslator.isTooLong(message, session)) { if (MessageTranslator.isTooLong(message, session)) {
return; return;
} }