From b2760933bfd108f630ec85ea45a5f120e7ab356f Mon Sep 17 00:00:00 2001 From: Aizistral Date: Thu, 17 Nov 2022 19:19:02 +0100 Subject: [PATCH] Recognition for legacy protocols Fixes #123 --- .../nochatreports/mixins/common/MixinServerStatus.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/aizistral/nochatreports/mixins/common/MixinServerStatus.java b/src/main/java/com/aizistral/nochatreports/mixins/common/MixinServerStatus.java index 92680928..9261fdf6 100644 --- a/src/main/java/com/aizistral/nochatreports/mixins/common/MixinServerStatus.java +++ b/src/main/java/com/aizistral/nochatreports/mixins/common/MixinServerStatus.java @@ -36,6 +36,11 @@ public void onSecureChatCheck(CallbackInfoReturnable info) { @Override public boolean preventsChatReports() { + var self = (ServerStatus) (Object) this; + + if (self.getVersion() != null && self.getVersion().getProtocol() < 759) + return true; + return this.preventsChatReports; }