Skip to content

Commit

Permalink
Fix popup still appear if chat signature disabled
Browse files Browse the repository at this point in the history
Set enforce secure chat to true in login packet to remove popup when disabled the chat signature.
  • Loading branch information
Dreeam-qwq committed Sep 25, 2024
1 parent 023fc3b commit 4548da8
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4548da8

Please sign in to comment.