From deea75d745332546720a3a06774ee0f1c11f49aa Mon Sep 17 00:00:00 2001
From: Jake Potrebic <jake.m.potrebic@gmail.com>
Date: Fri, 16 Dec 2022 09:15:21 -0800
Subject: [PATCH] Fix Player#chat for 1.19.3 (#8684)

---
 patches/server/Ensure-commands-are-not-ran-async.patch | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/patches/server/Ensure-commands-are-not-ran-async.patch b/patches/server/Ensure-commands-are-not-ran-async.patch
index f07b2740df..a41502eb4e 100644
--- a/patches/server/Ensure-commands-are-not-ran-async.patch
+++ b/patches/server/Ensure-commands-are-not-ran-async.patch
@@ -122,9 +122,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
 +            if (msg.startsWith("/")) {
 +                this.getHandle().connection.handleCommand(msg);
 +            } else {
-+                // TODO text filtering
++                final PlayerChatMessage playerChatMessage = PlayerChatMessage.system(msg).withResult(new net.minecraft.network.chat.ChatDecorator.ModernResult(Component.literal(msg), true, false));
 +                // TODO chat decorating
-+                this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false);
++                // TODO text filtering
++                this.getHandle().connection.chat(msg, playerChatMessage, false);
 +            }
 +        }
 +        // Paper end