19 lines
434 B
Rust
19 lines
434 B
Rust
|
|
use crate::protocol::Serializable;
|
|
use crate::protocol::packet::play::serverbound::PluginMessageServerbound;
|
|
|
|
pub struct Brand {
|
|
pub brand: String,
|
|
}
|
|
|
|
impl Brand {
|
|
pub fn as_message(self) -> PluginMessageServerbound {
|
|
let mut data = vec![];
|
|
Serializable::write_to(&self.brand, &mut data).unwrap();
|
|
PluginMessageServerbound {
|
|
channel: "MC|Brand".into(),
|
|
data,
|
|
}
|
|
}
|
|
}
|