3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-11-08 17:20:20 +01:00

Fixed single line if statements

Dieser Commit ist enthalten in:
rtm516 2020-04-15 10:51:56 +01:00
Ursprung 55608a2a48
Commit 34a8a6d55f
2 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -48,7 +48,9 @@ public class BedrockCommandRequestTranslator extends PacketTranslator<CommandReq
} else { } else {
String message = packet.getCommand().trim(); String message = packet.getCommand().trim();
if (MessageUtils.isTooLong(message, session)) { return; } if (MessageUtils.isTooLong(message, session)) {
return;
}
ClientChatPacket chatPacket = new ClientChatPacket(message); ClientChatPacket chatPacket = new ClientChatPacket(message);
session.getDownstream().getSession().send(chatPacket); session.getDownstream().getSession().send(chatPacket);

Datei anzeigen

@ -41,7 +41,9 @@ public class BedrockTextTranslator extends PacketTranslator<TextPacket> {
if (packet.getMessage().charAt(0) == '.') { if (packet.getMessage().charAt(0) == '.') {
String message = packet.getMessage().replace(".", "/").trim(); String message = packet.getMessage().replace(".", "/").trim();
if (MessageUtils.isTooLong(message, session)) { return; } if (MessageUtils.isTooLong(message, session)) {
return;
}
ClientChatPacket chatPacket = new ClientChatPacket(message); ClientChatPacket chatPacket = new ClientChatPacket(message);
session.getDownstream().getSession().send(chatPacket); session.getDownstream().getSession().send(chatPacket);
@ -50,7 +52,9 @@ public class BedrockTextTranslator extends PacketTranslator<TextPacket> {
String message = packet.getMessage().trim(); String message = packet.getMessage().trim();
if (MessageUtils.isTooLong(message, session)) { return; } if (MessageUtils.isTooLong(message, session)) {
return;
}
ClientChatPacket chatPacket = new ClientChatPacket(message); ClientChatPacket chatPacket = new ClientChatPacket(message);
session.getDownstream().getSession().send(chatPacket); session.getDownstream().getSession().send(chatPacket);