This commit is contained in:
IPECTER
2023-04-14 20:57:13 +09:00
parent 26154a8a1a
commit 41b1677130

View File

@@ -80,7 +80,7 @@ index ed696a749feed6e9da9302e15130694e659a0a0b..3726af867efbb5dc5b898e00efd5e35f
public void send(Packet<?> packet) {
+ // Plazma start - NCR
+ if (org.plazmamc.plazma.configurations.GlobalConfiguration.get().noChatReports.convertToGameMessage() && packet instanceof ClientboundPlayerChatPacket chat) {
+ this.send(new ClientboundSystemChatPacket(chat.chatType().resolve(this.player.level.registryAccess()).get().decorate(chat.unsignedContent() != null ? chat.unsignedContent() : Component.literal(chat.body().content())), false));
+ this.send(new ClientboundSystemChatPacket(null, Component.Serializer.toJson(chat.chatType().resolve(this.player.level.registryAccess()).get().decorate(chat.unsignedContent() != null ? chat.unsignedContent() : Component.literal(chat.body().content()))), false));
+ return;
+ }
this.send(packet, (PacketSendListener) null);