2016-04-08 13:30:05 -04:00
|
|
|
|
2018-11-04 14:48:03 -05:00
|
|
|
use crate::protocol::Serializable;
|
|
|
|
use crate::protocol::packet::play::serverbound::PluginMessageServerbound;
|
2016-04-08 13:30:05 -04:00
|
|
|
|
|
|
|
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: data,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|