From 34a8a6d55fc9fa2298a9d5fe3a0d917ee4043ba1 Mon Sep 17 00:00:00 2001 From: rtm516 Date: Wed, 15 Apr 2020 10:51:56 +0100 Subject: [PATCH] Fixed single line if statements --- .../bedrock/BedrockCommandRequestTranslator.java | 4 +++- .../translators/bedrock/BedrockTextTranslator.java | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockCommandRequestTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockCommandRequestTranslator.java index c8d8c3233..e7d4c7486 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockCommandRequestTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/bedrock/BedrockCommandRequestTranslator.java @@ -48,7 +48,9 @@ public class BedrockCommandRequestTranslator extends PacketTranslator { 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 { 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);