Skip to content
mc-protocol
Esc
↑↓navigate↵open⌘Jpreview
On this page

Player Input

Play 0x2B, client → server.

play · 0x2B · serverbound (client → server)

Sends the raw movement input bits: forward, backward, left, right, jump, sneak, and sprint. Sent every tick the input changes. The server uses it to steer vehicles, detect sneaking and sprinting, and for movement prediction.

Sent by the client, read by the server. Listen for it with client.on("PlayerInput", (data) => …) on the receiving side.

Fields

Field Type Notes
inputs UByte also flags

Send it

await client.sendPacket("PlayerInput", {
  inputs: /* UByte */,
});

Field aliases listed under Notes are accepted as alternative keys when writing.

Source: src/Core/Versions/776/Packets/play/serverbound/PlayerInput.ts

Was this page helpful?