From 2e0e88db0d790741cc05fe177bcd98d9bf5d579e Mon Sep 17 00:00:00 2001 From: Outfluencer <48880402+Outfluencer@users.noreply.github.com> Date: Thu, 22 Jul 2021 03:43:03 +0200 Subject: [PATCH] #3158: Remove redundant protocol version check in the TabCompleteResponse packet No need for the second if in the read and write method use a else instead --- .../md_5/bungee/protocol/packet/TabCompleteResponse.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteResponse.java b/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteResponse.java index ca7c6342..21aa9675 100644 --- a/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteResponse.java +++ b/protocol/src/main/java/net/md_5/bungee/protocol/packet/TabCompleteResponse.java @@ -57,9 +57,7 @@ public class TabCompleteResponse extends DefinedPacket } suggestions = new Suggestions( range, matches ); - } - - if ( protocolVersion < ProtocolConstants.MINECRAFT_1_13 ) + } else { commands = readStringArray( buf ); } @@ -84,9 +82,7 @@ public class TabCompleteResponse extends DefinedPacket writeString( suggestion.getTooltip().getString(), buf ); } } - } - - if ( protocolVersion < ProtocolConstants.MINECRAFT_1_13 ) + } else { writeStringArray( commands, buf ); }