Mirror von
https://github.com/GeyserMC/Geyser.git
synchronisiert 2024-11-03 14:50:19 +01:00
Only replace the first '.' in a message (#463)
Dieser Commit ist enthalten in:
Ursprung
99880c7d46
Commit
2e3f32d769
@ -38,19 +38,7 @@ public class BedrockTextTranslator extends PacketTranslator<TextPacket> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void translate(TextPacket packet, GeyserSession session) {
|
public void translate(TextPacket packet, GeyserSession session) {
|
||||||
if (packet.getMessage().charAt(0) == '.') {
|
String message = packet.getMessage().replaceAll("^\\.", "/").trim();
|
||||||
String message = packet.getMessage().replace(".", "/").trim();
|
|
||||||
|
|
||||||
if (MessageUtils.isTooLong(message, session)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
ClientChatPacket chatPacket = new ClientChatPacket(message);
|
|
||||||
session.getDownstream().getSession().send(chatPacket);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
String message = packet.getMessage().trim();
|
|
||||||
|
|
||||||
if (MessageUtils.isTooLong(message, session)) {
|
if (MessageUtils.isTooLong(message, session)) {
|
||||||
return;
|
return;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren