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

Level Event

Play 0x2E, server → client.

play · 0x2E · clientbound (server → client)

Plays a world effect identified by effectId at location, such as a door opening sound, a block breaking sound and particles, a record playing, or a portal spawn effect. data carries an effect-specific parameter and global makes the effect play regardless of distance. The client plays the sound or particles.

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

Fields

Field Type Notes
effectId Int
location Position also position
data Int
global Boolean

Send it

await client.sendPacket("LevelEvent", {
  effectId: /* Int */,
  location: /* Position */,
  data: /* Int */,
  global: /* Boolean */,
});

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

Source: src/Core/Versions/776/Packets/play/clientbound/LevelEvent.ts

Was this page helpful?