switch to chat types in say command
This commit is contained in:
parent
1dcbea59a4
commit
df9ea7fe96
@ -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(())
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user