Fix Player#chat kicking all clients (#8262)

This commit is contained in:
Josh Roy 2022-08-08 03:31:10 -04:00 committed by GitHub
parent 3624637a19
commit a47301e40f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -21,7 +21,7 @@ character.
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com> Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 4bdb7b50315c68a3f3c929745bf090f5c7a51c52..6ce257fca3a3645fdb68f877279bcae343dbd548 100644 index 955902a36c01697999e08a218887e90946a04b3a..44e9edb76a518b12b1f20e73343ed720740d8662 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2023,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -2023,7 +2023,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
@ -107,7 +107,7 @@ index 415393e965c7253412ec4d893c3e62ad14dd69f2..846c5144fefd1dfd1bbd8e6f82bd9248
return true; return true;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 82a640887a75c360539c1787dbbb32750f6b1379..69d2a0422f1066f7f52e7c81fa6c99019bb6dbfc 100644 index 82a640887a75c360539c1787dbbb32750f6b1379..2666e55d72fd7731a2bde42d690762a2747dac90 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -461,7 +461,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -461,7 +461,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -124,7 +124,7 @@ index 82a640887a75c360539c1787dbbb32750f6b1379..69d2a0422f1066f7f52e7c81fa6c9901
+ } else { + } else {
+ // TODO text filtering + // TODO text filtering
+ // TODO chat decorating + // TODO chat decorating
+ this.getHandle().connection.chat(msg, PlayerChatMessage.unsigned(net.minecraft.network.chat.MessageSigner.create(this.getUniqueId()), new net.minecraft.network.chat.ChatMessageContent(msg)), false); + this.getHandle().connection.chat(msg, PlayerChatMessage.system(new net.minecraft.network.chat.ChatMessageContent(msg)), false);
+ } + }
+ } + }
+ // Paper en + // Paper en