#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
This commit is contained in:
Outfluencer 2021-07-22 03:43:03 +02:00 committed by GitHub
parent 96482cc0cf
commit 2e0e88db0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,9 +57,7 @@ public class TabCompleteResponse extends DefinedPacket
} }
suggestions = new Suggestions( range, matches ); suggestions = new Suggestions( range, matches );
} } else
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_13 )
{ {
commands = readStringArray( buf ); commands = readStringArray( buf );
} }
@ -84,9 +82,7 @@ public class TabCompleteResponse extends DefinedPacket
writeString( suggestion.getTooltip().getString(), buf ); writeString( suggestion.getTooltip().getString(), buf );
} }
} }
} } else
if ( protocolVersion < ProtocolConstants.MINECRAFT_1_13 )
{ {
writeStringArray( commands, buf ); writeStringArray( commands, buf );
} }