Pumpkin/pumpkin-protocol/src/client/play/c_set_title.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
290 B
Rust

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