Command Suggestions
Play 0x0F, server → client.
play · 0x0F · clientbound (server → client)
Returns tab-completion suggestions for the command the client is typing. The server sends it in response to a serverbound CommandSuggestion request with the same transactionId; start and length give the text range the matches replace. The client shows the matches and optional tooltips in the chat input.
Sent by the server, read by the client. Listen for it with client.on("CommandSuggestions", (data) => …) on the receiving side.
Fields
| Field | Type | Notes |
|---|---|---|
transactionId |
VarInt | |
start |
VarInt | |
length |
VarInt | |
matches |
Array |
Send it
await client.sendPacket("CommandSuggestions", {
transactionId: /* VarInt */,
start: /* VarInt */,
length: /* VarInt */,
matches: /* Array */,
});
Field aliases listed under Notes are accepted as alternative keys when writing.
Source: src/Core/Versions/776/Packets/play/clientbound/CommandSuggestions.ts