messge,messagee -> message

This commit is contained in:
StripedMonkey 2024-08-20 20:01:28 -04:00
parent 8494388324
commit 7c30391e2c
3 changed files with 7 additions and 7 deletions

View File

@ -4,12 +4,12 @@ use serde::Serialize;
#[derive(Serialize)]
#[packet(0x6C)]
pub struct CSystemChatMessge<'a> {
pub struct CSystemChatMessage<'a> {
content: TextComponent<'a>,
overlay: bool,
}
impl<'a> CSystemChatMessge<'a> {
impl<'a> CSystemChatMessage<'a> {
pub fn new(content: TextComponent<'a>, overlay: bool) -> Self {
Self { content, overlay }
}

View File

@ -13,7 +13,7 @@ pub struct SChatMessage {
pub timestamp: i64,
pub salt: i64,
pub signature: Option<Bytes>,
pub messagee_count: VarInt,
pub message_count: VarInt,
pub acknowledged: FixedBitSet,
}
@ -25,7 +25,7 @@ impl ServerPacket for SChatMessage {
timestamp: bytebuf.get_i64(),
salt: bytebuf.get_i64(),
signature: bytebuf.get_option(|v| v.copy_to_bytes(256)),
messagee_count: bytebuf.get_var_int(),
message_count: bytebuf.get_var_int(),
acknowledged: bytebuf.get_fixed_bitset(20),
})
}

View File

@ -19,7 +19,7 @@ use pumpkin_protocol::{
client::{
config::CConfigDisconnect,
login::CLoginDisconnect,
play::{CGameEvent, CPlayDisconnect, CSyncPlayerPostion, CSystemChatMessge},
play::{CGameEvent, CPlayDisconnect, CSetContainerContent, CSyncPlayerPosition, CSystemChatMessage},
},
packet_decoder::PacketDecoder,
packet_encoder::PacketEncoder,
@ -160,7 +160,7 @@ impl Client {
entity.yaw = yaw;
entity.pitch = pitch;
player.awaiting_teleport = Some(id.into());
self.send_packet(&CSyncPlayerPostion::new(x, y, z, yaw, pitch, 0, id.into()));
self.send_packet(&CSyncPlayerPosition::new(x, y, z, yaw, pitch, 0, id.into()));
}
pub fn update_health(&mut self, health: f32, food: i32, food_saturation: f32) {
@ -362,7 +362,7 @@ impl Client {
}
pub fn send_system_message(&mut self, text: TextComponent) {
self.send_packet(&CSystemChatMessge::new(text, false));
self.send_packet(&CSystemChatMessage::new(text, false));
}
/// Kicks the Client with a reason depending on the connection state