9
0
mirror of https://github.com/BX-Team/DivineMC.git synced 2025-12-22 00:09:15 +00:00
Files
DivineMC/patches/server/0021-Do-not-process-chat-commands-before-player-has-joine.patch
NONPLAYT f1b113c687 Updated Upstream (Purpur)
Upstream has released updates that appear to apply and compile correctly

Purpur Changes:
PurpurMC/Purpur@22eb20c Updated Upstream (Paper)
PurpurMC/Purpur@0e36fd0 Updated Upstream (Paper)
PurpurMC/Purpur@a52c4a4 Updated Upstream (Paper)
PurpurMC/Purpur@02db6ef handle default food attributes better, fixes #1404
PurpurMC/Purpur@e1e566a [ci-skip] fix patch header
PurpurMC/Purpur@98f1077 actually use spongeAbsorptionArea option
PurpurMC/Purpur@41ab912 Updated Upstream (Paper)
PurpurMC/Purpur@005a519 Updated Upstream (Paper)
2023-08-11 22:18:52 +03:00

20 lines
1.3 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: NONPLAYT <76615486+NONPLAYT@users.noreply.github.com>
Date: Sun, 11 Jun 2023 23:43:00 +0300
Subject: [PATCH] Do not process chat/commands before player has joined
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index ac70ab790f73e35fd5ec880f5a884da935d8cd7b..9e19cd74cc957fcd6a78f673e1267df73eb0fedb 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2472,6 +2472,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
this.disconnect(Component.translatable("multiplayer.disconnect.out_of_order_chat"), org.bukkit.event.player.PlayerKickEvent.Cause.OUT_OF_ORDER_CHAT); // Paper - kick event ca
}); // Paper - push to main
return Optional.empty();
+ } else if (player.joining) { // DivineMC - EMC - do not handle chat messages before they joined
+ return Optional.empty();
} else {
Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(acknowledgment);