Skip to main content

steel_protocol/packets/game/
s_command_suggestion.rs

1use steel_macros::{ReadFrom, ServerPacket};
2#[expect(unused_imports)]
3use steel_registry::packets::play::S_COMMAND_SUGGESTION;
4
5/// Sent by the client when requesting command suggestions (tab completion).
6#[derive(ServerPacket, ReadFrom, Clone, Debug)]
7#[packet_id(Play = S_COMMAND_SUGGESTION)]
8pub struct SCommandSuggestion {
9    /// Transaction ID used to match this request with the server's response.
10    #[read(as = VarInt)]
11    pub id: i32,
12    /// The command being typed, including the leading slash.
13    #[read(as = Prefixed(VarInt), bound = 32500)]
14    pub command: String,
15}