From 4548da8fd6d24c879631cd43d56ac07dc08540f5 Mon Sep 17 00:00:00 2001 From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com> Date: Wed, 25 Sep 2024 10:10:56 -0400 Subject: [PATCH] Fix popup still appear if chat signature disabled Set enforce secure chat to true in login packet to remove popup when disabled the chat signature. --- ...rai-Configurable-chat-message-signatures.patch | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/patches/server/0067-Mirai-Configurable-chat-message-signatures.patch b/patches/server/0067-Mirai-Configurable-chat-message-signatures.patch index 62b8c93cb..f07121ba1 100644 --- a/patches/server/0067-Mirai-Configurable-chat-message-signatures.patch +++ b/patches/server/0067-Mirai-Configurable-chat-message-signatures.patch @@ -23,6 +23,19 @@ index f962e82e2c70f328a23dc99193d072f8dd7ad949..8ec7cb984ef4c45a14292388c0268bcc } } +diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java +index 667d1da3b6332737d7382d383bf15b53bd726442..f37ee137a40df4e9d7c0d8c76bb0ddc65f11a7fd 100644 +--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java ++++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLoginPacket.java +@@ -55,7 +55,7 @@ public record ClientboundLoginPacket( + buf.writeBoolean(this.showDeathScreen); + buf.writeBoolean(this.doLimitedCrafting); + this.commonPlayerSpawnInfo.write(buf); +- buf.writeBoolean(this.enforcesSecureChat); ++ buf.writeBoolean(!org.dreeam.leaf.config.modules.network.ChatMessageSignature.enabled || this.enforcesSecureChat); // Leaf - Mirai - Configurable chat message signatures + } + + @Override diff --git a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java b/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java index 07df3299f1d1aa5506e1f6f146347d53e0278d9c..62d5fb8b89cbcd4e7c1d1d920e12ff36ee5435f3 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ServerboundChatPacket.java @@ -117,7 +130,7 @@ index 648a342c309c12dedf7d70b88163f80fb72150cf..b8b2914543f4bfe71a9734e3d848fba0 if (packet == null || this.processedDisconnect) { // Spigot return; diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 70607537c900b1af1ddef0ea1f33612c7724299d..de30155875f1c279a35dc7e0506f69b1b583b1f6 100644 +index 5d81f06c981128e4199555c1378345dccf4682b2..4ec44f3b5f58f8e21fe5224167e1178fb55770f8 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java @@ -1641,7 +1641,7 @@ public abstract class PlayerList {