switch to chat types in say command

This commit is contained in:
Alexander Medvedev committed 2025-01-23 21:44:07 +01:00
1 parent 1dcbea59a4
commit df9ea7fe96
1 file changed
+7 -5
+7 -5
View File
@@ -1,5 +1,5 @@
use async_trait::async_trait;
use pumpkin_protocol::client::play::CSystemChatMessage;
use pumpkin_data::world::SAY_COMMAND;
use pumpkin_util::text::TextComponent;
use crate::command::{
@@ -31,10 +31,12 @@ impl CommandExecutor for SayExecutor {
};
server
.broadcast_packet_all(&CSystemChatMessage::new(
&TextComponent::text(format!("[{sender}] {msg}")),
false,
))
.broadcast_message(
&TextComponent::text(msg.clone()),
&TextComponent::text(format!("{sender}")),
SAY_COMMAND,
None,
)
.await;
Ok(())
}