forked from GeyserMC/Geyser
Fixed single line if statements
This commit is contained in:
parent
55608a2a48
commit
34a8a6d55f
2 changed files with 9 additions and 3 deletions
|
@ -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);
|
||||||
|
|
|
@ -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);
|
||||||
|
|
Loading…
Reference in a new issue