# Events

Lukkit allows you to hook into events, such as those when a block has been placed or a player has sent a chat message. To register an event, you can use the [`plugin.registerEvent(event: string, callback: function)`](https://docs.lukkit.net/globals/global-variables/plugin) method. The event parameter can be an event listed in the [event list](https://docs.lukkit.net/events/event-list) or a path to a class, such as `org.bukkit.player.PlayerJoinEvent`.


---

# Agent Instructions: 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:

```
GET https://docs.lukkit.net/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
