diff options
Diffstat (limited to 'src/main/java')
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatListener.java | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatListener.java b/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatListener.java index 274e67e..654d44a 100644 --- a/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatListener.java +++ b/src/main/java/com/aizistral/nochatreports/mixins/client/MixinChatListener.java @@ -44,8 +44,12 @@ public class MixinChatListener { } else { var evaluate = ChatTrustLevel.evaluate(playerChatMessage, component, playerInfo, instant); - if ((evaluate == ChatTrustLevel.NOT_SECURE || evaluate == ChatTrustLevel.BROKEN_CHAIN) - && NoReportsConfig.hideRedChatIndicators()) { + if (evaluate == ChatTrustLevel.BROKEN_CHAIN) { + info.setReturnValue(evaluate); + return; + } + + if (evaluate == ChatTrustLevel.NOT_SECURE && NoReportsConfig.hideRedChatIndicators()) { info.setReturnValue(ChatTrustLevel.SECURE); } else if ((evaluate == ChatTrustLevel.FILTERED || evaluate == ChatTrustLevel.MODIFIED) && NoReportsConfig.hideYellowChatIndicators()) { @@ -62,16 +66,4 @@ public class MixinChatListener { } } - /** - * @reason Prevent client from disconnecting when chat chain is broken. - * Normal average user will not even understand what happened, so this is absolutely - * useless for them. - * @author Aizistral - */ - - @Inject(method = "onChatChainBroken", at = @At("HEAD"), cancellable = true) - private void stopUselessDisconnects(CallbackInfo info) { - info.cancel(); - } - } |
