1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use std::borrow::Cow;

use valence_text::Text;

use crate::{Decode, Encode, Packet, VarInt};

#[derive(Clone, Debug, Encode, Decode, Packet)]
pub struct CommandSuggestionsS2c<'a> {
    pub id: VarInt,
    pub start: VarInt,
    pub length: VarInt,
    pub matches: Vec<CommandSuggestionsMatch<'a>>,
}

#[derive(Clone, PartialEq, Debug, Encode, Decode)]
pub struct CommandSuggestionsMatch<'a> {
    pub suggested_match: &'a str,
    pub tooltip: Option<Cow<'a, Text>>,
}