Pumpkin/pumpkin-protocol/src/client/play/c_subtitle.rs
Snowiiii a6d9ed216d Use Cow's in TextComponent
We now don't always convert &str to Strings allowing us to use stack allocations
2024-08-19 20:05:18 +02:00

16 lines
297 B
Rust

use pumpkin_macros::packet;
use pumpkin_text::TextComponent;
use serde::Serialize;
#[derive(Serialize)]
#[packet(0x63)]
pub struct CSubtitle<'a> {
subtitle: TextComponent<'a>,
}
impl<'a> CSubtitle<'a> {
pub fn new(subtitle: TextComponent<'a>) -> Self {
Self { subtitle }
}
}