# Events

Events are the most common structure, they let you listen to different actions performed by players, entities, the server, or even Minecraft itself.

{% hint style="info" %}
Events are very versatile, Skript has numerous events for almost anything that can happen, and addons can add even more.

There are some common events, such as `on damage:`, `on jump:`, and `on right-click:`, but there are also many niche or even obscure events such as `on book edit:`, `on experience spawn:`, and `on block form:`.

No matter what action you're trying to detect, chances are there's an event for it.
{% endhint %}

An event line will always start with `on`, and then the event, with a colon at the end.

Examples:\
`on kill:`, `on right-click:`, `on join:`

{% hint style="info" %}
There are special events called periodical events that do not start with `on`, but `every`. For example, `every 10 seconds:`. To learn more about periodical events, see the [Periodical Events page](/syntask/fundamentals/structures/events/periodical-events.md).
{% endhint %}

***

## Event-values

Events will have handy expressions called event-values. These are how you will refer to objects pertaining to that event, such as the perpetrator, location, and many more.

Event values will always start with `event-` and then the name of the object;

{% code overflow="wrap" lineNumbers="true" %}

```python
on break:
  if (type of event-block) = diamond ore:
    spawn 1 of creeper at event-location
    send "Boo!" to event-player
```

{% endcode %}

`event-location` refers to where an event takes place, in this case, it is the location of the broken diamond ore, which is the `event-block`.&#x20;

`event-player` is the player that broke the diamond ore. This event-value is used so frequently, it's usually shortened to just `player`.


---

# 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://x8ight.gitbook.io/syntask/fundamentals/structures/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.
