chunkedge_protocol/packets/play/
command_suggestions_s2c.rs1use std::borrow::Cow;
2
3use chunkedge_binary::{Decode, Encode, TextComponent, VarInt};
4
5use crate::Packet;
6
7#[derive(Clone, Debug, Encode, Decode, Packet)]
8pub struct CommandSuggestionsS2c<'a> {
9 pub id: VarInt,
10 pub start: VarInt,
11 pub length: VarInt,
12 pub matches: Vec<CommandSuggestionsMatch<'a>>,
13}
14
15#[derive(Clone, PartialEq, Debug, Encode, Decode)]
16pub struct CommandSuggestionsMatch<'a> {
17 pub suggested_match: &'a str,
18 pub tooltip: Option<Cow<'a, TextComponent>>,
19}