aboutsummaryrefslogtreecommitdiff
path: root/azalea-protocol/src/packets/game/clientbound_chat_packet.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-protocol/src/packets/game/clientbound_chat_packet.rs')
-rw-r--r--azalea-protocol/src/packets/game/clientbound_chat_packet.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/azalea-protocol/src/packets/game/clientbound_chat_packet.rs b/azalea-protocol/src/packets/game/clientbound_chat_packet.rs
new file mode 100644
index 00000000..3786993a
--- /dev/null
+++ b/azalea-protocol/src/packets/game/clientbound_chat_packet.rs
@@ -0,0 +1,17 @@
+use azalea_chat::component::Component;
+use packet_macros::{GamePacket, McBufReadable, McBufWritable};
+use uuid::Uuid;
+
+#[derive(Clone, Debug, GamePacket)]
+pub struct ClientboundChatPacket {
+ pub message: Component,
+ pub type_: ChatType,
+ pub sender: Uuid,
+}
+
+#[derive(Clone, Debug, Copy, McBufReadable, McBufWritable)]
+pub enum ChatType {
+ Chat = 0,
+ System = 1,
+ GameInfo = 2,
+}