> For the complete documentation index, see [llms.txt](https://docs.quickclient.cc/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.quickclient.cc/en/events/reference.md).

# Event list

All event names, their data and whether they can be cancelled.

This page lists all names you can pass to `on(name, handler)`. The event data is returned by `event.payload()`, and "none" means there is no data. If an event can be cancelled, the description says so.

## Ticks and movement

| Name             | Payload                                          | Description                                                                    |
| ---------------- | ------------------------------------------------ | ------------------------------------------------------------------------------ |
| `tick`           | none                                             | player tick, 20 times per second                                               |
| `gameTick`       | none                                             | client tick, also fires outside a world                                        |
| `update`         | none                                             | player update before movement is sent                                          |
| `input`          | `Object[]`: forward, strafe, jump, shift, sprint | input is collected, movement is not applied yet; `control().motion` works here |
| `postUpdate`     | `Object[]`: forward, strafe, jump, shift, sprint | after the input update                                                         |
| `motion`         | none                                             | before the movement packet; rotations work here                                |
| `move`           | offset                                           | how far the player moved during the tick                                       |
| `jump`           | entity                                           | jump                                                                           |
| `entityVelocity` | `Object[]`: entity, vector                       | the server sent an entity's velocity                                           |

## Combat and items

| Name           | Payload                                | Description                          |
| -------------- | -------------------------------------- | ------------------------------------ |
| `attack`       | entity                                 | attack on an entity                  |
| `useItem`      | `Object[]`: entity, item               | an item was used                     |
| `interactItem` | `Object[]`: entity, item               | interaction with an item             |
| `useTotem`     | `Object[]`: entity, item               | a totem was triggered                |
| `slotChange`   | `Integer` slot                         | the item in a slot changed           |
| `hotbarSelect` | `Integer` slot                         | a different hotbar slot was selected |
| `clickSlot`    | `Object[]`: slot, button, container id | click on a slot                      |
| `death`        | entity                                 | death                                |

## Blocks and world

| Name           | Payload                     | Description                  |
| -------------- | --------------------------- | ---------------------------- |
| `destroyBlock` | `Object[]`: position, side  | a block was broken           |
| `placeBlock`   | none                        | a block was placed           |
| `newBlock`     | `Object[]`: position, state | a block in the world changed |
| `joinWorld`    | none                        | you joined a world           |

## Input, chat, network

| Name            | Payload                                         | Description                                       |
| --------------- | ----------------------------------------------- | ------------------------------------------------- |
| `key`           | `Integer` GLFW code                             | key press while no screen is open                 |
| `keyRelease`    | `Integer` GLFW code                             | a key was released                                |
| `mouse`         | `Object[]`: button, `"press"`/`"release"`, x, y | mouse button                                      |
| `sendMessage`   | `String` text                                   | you send a chat message; can be cancelled         |
| `chatReceive`   | `String` text                                   | a message arrived; can be cancelled               |
| `packetSend`    | `PacketInfo`                                    | a packet is going to the server; can be cancelled |
| `packetReceive` | `PacketInfo`                                    | a packet arrived; can be cancelled                |
| `toggleModule`  | `Object[]`: name, new state                     | a Quick module was enabled or disabled            |

`packetSend` and `packetReceive` pass a `PacketInfo`: the packet type and all its fields, parsed into a flat set. See [Packets](/en/actions/packets.md) for details.

## Which one to pick

* Tick: `onTick()` or `on(TickEvent.class, …)`. `tick` by name works the same way.
* Keys and mouse: `KeyEvent` and `MouseEvent`. They already include modifiers, the screen and cancelling.
* Chat: `ChatEvent`. It has the source, the formatted text and `after(prefix)`.
* Sounds: only `SoundEvent`, there is no event with that name.

To see which events your Quick build has, call `eventNames()` inside a script or run `.script check` in chat.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.quickclient.cc/en/events/reference.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
