From 4fb7e02326860d0138e82e290fe381834f61897b Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Fri, 30 Oct 2020 06:35:35 -0400 Subject: [PATCH] Fix Checkstyle error --- .../velocitypowered/proxy/connection/MinecraftConnection.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java index cb161b38d..191cb7ab1 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/connection/MinecraftConnection.java @@ -223,9 +223,9 @@ public class MinecraftConnection extends ChannelInboundHandlerAdapter { */ public void closeWith(Object msg) { if (channel.isActive()) { - boolean is1_7 = this.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) < 0 + boolean is17 = this.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_8) < 0 && this.getProtocolVersion().compareTo(ProtocolVersion.MINECRAFT_1_7_2) >= 0; - if (is1_7) { + if (is17) { channel.eventLoop().execute(() -> { // 1.7.x versions have a race condition with switching protocol states, so just explicitly // close the connection after a short while.