diff options
| author | Aizistral | 2022-07-22 14:45:19 +0200 |
|---|---|---|
| committer | Aizistral | 2022-07-22 14:45:19 +0200 |
| commit | 4acc48df7e0e22698d332435175e706caf1f6ee2 (patch) | |
| tree | f93ba76de65fecfd72bb58b6ebc9118c0eb7dbb5 /src/main/java/com/aizistral/nochatreports | |
| parent | 24724cb8d8a49e2c46ecacb8b0c5cb557ab7705a (diff) | |
Remove `[Not Secure]` mark from server chat logs
Closes #70
Diffstat (limited to 'src/main/java/com/aizistral/nochatreports')
| -rw-r--r-- | src/main/java/com/aizistral/nochatreports/mixins/server/MixinPlayerList.java | 25 |
1 files changed, 25 insertions, 0 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); + } + +} |
