From 9d940232d84c6beb782ceff4921795e01fb0ae99 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:32:26 +0100 Subject: [PATCH] Fixed auto detect breaking version comparisons --- .../viaproxy/protocoltranslator/ProtocolTranslator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/raphimc/viaproxy/protocoltranslator/ProtocolTranslator.java b/src/main/java/net/raphimc/viaproxy/protocoltranslator/ProtocolTranslator.java index 70a234e..4c9a3a6 100644 --- a/src/main/java/net/raphimc/viaproxy/protocoltranslator/ProtocolTranslator.java +++ b/src/main/java/net/raphimc/viaproxy/protocoltranslator/ProtocolTranslator.java @@ -43,9 +43,9 @@ public class ProtocolTranslator { protected Comparator customComparator() { return (o1, o2) -> { if (o1 == AUTO_DETECT_PROTOCOL) { - return -1; - } else if (o2 == AUTO_DETECT_PROTOCOL) { return 1; + } else if (o2 == AUTO_DETECT_PROTOCOL) { + return -1; } else { return 0; }