aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/client.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-10-30 15:28:19 -0500
committermat <github@matdoes.dev>2022-10-30 15:28:19 -0500
commit329f8b1784b26e2149f6edb4e969e10bd419a190 (patch)
tree89c641aa1c26bb8da9e1f23337ff3114ad52b8f2 /azalea-client/src/client.rs
parentc65e1fc6604baf308b8c2b20b94bf527a6721ade (diff)
downloadazalea-drasl-329f8b1784b26e2149f6edb4e969e10bd419a190.tar.xz
more docs
Diffstat (limited to 'azalea-client/src/client.rs')
-rw-r--r--azalea-client/src/client.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/azalea-client/src/client.rs b/azalea-client/src/client.rs
index ab52b65e..cb87c250 100644
--- a/azalea-client/src/client.rs
+++ b/azalea-client/src/client.rs
@@ -1,6 +1,6 @@
use crate::{movement::MoveDirection, Account, Player};
use azalea_auth::game_profile::GameProfile;
-use azalea_chat::component::Component;
+use azalea_chat::Component;
use azalea_core::{ChunkPos, ResourceLocation, Vec3};
use azalea_protocol::{
connect::{Connection, ConnectionError, ReadConnection, WriteConnection},
@@ -62,6 +62,7 @@ pub enum Event {
Packet(Box<ClientboundGamePacket>),
}
+/// A chat packet, either a system message or a chat message.
#[derive(Debug, Clone)]
pub enum ChatPacket {
System(ClientboundSystemChatPacket),
@@ -69,6 +70,7 @@ pub enum ChatPacket {
}
impl ChatPacket {
+ /// Get the message shown in chat for this packet.
pub fn message(&self) -> Component {
match self {
ChatPacket::System(p) => p.content.clone(),