From cfb2ca5d5aa4218b4cb78fd17056b7567e8e1343 Mon Sep 17 00:00:00 2001 From: RaphiMC <50594595+RaphiMC@users.noreply.github.com> Date: Thu, 15 Feb 2024 17:32:05 +0100 Subject: [PATCH] Fixed auto detect breaking version comparisons --- .../viafabricplus/protocoltranslator/ProtocolTranslator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java index cba40342..b8944f50 100644 --- a/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java +++ b/src/main/java/de/florianmichael/viafabricplus/protocoltranslator/ProtocolTranslator.java @@ -95,9 +95,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; }