Fixed single line if statements

This commit is contained in:
rtm516 2020-04-15 10:51:56 +01:00
parent 55608a2a48
commit 34a8a6d55f
2 changed files with 9 additions and 3 deletions

View file

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

View file

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