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 async_trait::async_trait;
|
||||||
use pumpkin_protocol::client::play::CSystemChatMessage;
|
use pumpkin_data::world::SAY_COMMAND;
|
||||||
use pumpkin_util::text::TextComponent;
|
use pumpkin_util::text::TextComponent;
|
||||||
|
|
||||||
use crate::command::{
|
use crate::command::{
|
||||||
@ -31,10 +31,12 @@ impl CommandExecutor for SayExecutor {
|
|||||||
};
|
};
|
||||||
|
|
||||||
server
|
server
|
||||||
.broadcast_packet_all(&CSystemChatMessage::new(
|
.broadcast_message(
|
||||||
&TextComponent::text(format!("[{sender}] {msg}")),
|
&TextComponent::text(msg.clone()),
|
||||||
false,
|
&TextComponent::text(format!("{sender}")),
|
||||||
))
|
SAY_COMMAND,
|
||||||
|
None,
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user