Packets

1figure
2min read
Sheet 7 of 47 · Bots

Bots > Packets builds any packet a game client can send, from a form, and sends it to one bot or to all of them. It is for testing what a server or plugin does with input a normal client never sends, or sends far less often.

Packets: pick a packet, fill its fields, send it to one bot or many.
The Packets page: the list of serverbound packets on the left, the form of the picked packet with count, delay and target in the middle, and what the server did on the right

Send a packet

  1. Pick a packet

    The list on the left holds every serverbound packet of the protocol, named without the Serverbound and Packet around it, so ServerboundSwingPacket reads Swing. A packet with no fields is sent as it is.

  2. Fill the form

    Every field of the packet gets a field of its own. Enum fields offer their values.

  3. Count, delay and target

    Count is how many times it goes out, Delay (ms) the pause between two. Target is the selected bot, the bots selected on the Bots screen, or all online bots.

  4. Send

    What the server did on the right lists every packet that went out and what came back.

Copy as curl puts the same send on the clipboard as an API call, with the API token header filled in. Raw and JSON shows the JSON the form turns into, and a field for raw bytes.

Raw packets

A raw packet skips the codec: a packet id for the game state (0x3C or 60) and a hex payload. The payload is written after the varint id, and the pipeline still compresses and frames it. It uses the same count, delay and target as the form.

Raw packets are refused while a bot is taken over through the takeover proxy.

Over HTTP

curl -H "X-ITT-Token: $TOKEN" "localhost:8767/packet?bot=online&type=ServerboundSwingPacket&count=20&delay=50"
curl -H "X-ITT-Token: $TOKEN" "localhost:8767/packet?bot=TestBot&id=0x3C&hex=00"
curl "localhost:8767/packet/list"
EndpointParametersReturns
/packetbot=X / all / online / Test_* (default online), type, json or the fields as a POST body, count=1, delay=0ok, sent, failed, errors, millis and a log
/packet (raw)bot, id=0x3C, hex, count, delaythe same, the id and payload go past the codec
/packet/listevery serverbound packet with composable and its fields: name, type, enum values, supported
/packet/templatenamea starting JSON for that packet
/packet/sendbot, then packet and json, or POST {"packet": name, "fields": {...}}the answer of the bot's raw action

/packet and /packet/send need the API token. See HTTP API. A bot's own packet log, with a packet writer behind one key, is on the Bots screen, see Bots.

Loading the index

Enter openUp Down moveEsc close