summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/java/com/aizistral/nochatreports/mixins/server/MixinPlayerList.java25
-rw-r--r--src/main/resources/nochatreports.mixins.json3
2 files changed, 27 insertions, 1 deletions
diff --git a/src/main/java/com/aizistral/nochatreports/mixins/server/MixinPlayerList.java b/src/main/java/com/aizistral/nochatreports/mixins/server/MixinPlayerList.java
new file mode 100644
index 0000000..79a6959
--- /dev/null
+++ b/src/main/java/com/aizistral/nochatreports/mixins/server/MixinPlayerList.java
@@ -0,0 +1,25 @@
+package com.aizistral.nochatreports.mixins.server;
+
+import org.spongepowered.asm.mixin.Mixin;
+import org.spongepowered.asm.mixin.injection.At;
+import org.spongepowered.asm.mixin.injection.Inject;
+import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable;
+
+import net.minecraft.network.chat.ChatSender;
+import net.minecraft.network.chat.PlayerChatMessage;
+import net.minecraft.server.players.PlayerList;
+
+@Mixin(PlayerList.class)
+public class MixinPlayerList {
+
+ /**
+ * @reason Remove "Not Secure" mark in server chat logs.
+ * @author Aizistral
+ */
+
+ @Inject(method = "verifyChatTrusted", at = @At("HEAD"), cancellable = true)
+ private void onVerifyChatTrusted(PlayerChatMessage playerChatMessage, ChatSender chatSender, CallbackInfoReturnable<Boolean> info) {
+ info.setReturnValue(true);
+ }
+
+}
diff --git a/src/main/resources/nochatreports.mixins.json b/src/main/resources/nochatreports.mixins.json
index fbb1c1b..7881e3d 100644
--- a/src/main/resources/nochatreports.mixins.json
+++ b/src/main/resources/nochatreports.mixins.json
@@ -8,7 +8,8 @@
"server.MixinPlayer",
"server.MixinServerboundChatPacket",
"server.MixinServerGamePacketListenerImpl",
- "server.MixinServerStatus"
+ "server.MixinServerStatus",
+ "server.MixinPlayerList"
],
"client": [
"client.MixinLocalPlayer",