Expand TextComponent

This commit is contained in:
Snowiiii committed 2024-08-09 00:48:19 +02:00
1 parent b4abc6b297
commit 5f3a4d34d1
4 files changed
+263 -25

No files matched your search

+2 -4
View File
@@ -343,10 +343,8 @@ impl Client {
.unwrap_or_else(|_| self.close());
}
ConnectionState::Play => {
self.try_send_packet(CPlayDisconnect::new(TextComponent {
text: reason.to_string(),
}))
.unwrap_or_else(|_| self.close());
self.try_send_packet(CPlayDisconnect::new(TextComponent::from(reason)))
.unwrap_or_else(|_| self.close());
}
_ => {
log::warn!("Cant't kick in {:?} State", self.connection_state)