> For the complete documentation index, see [llms.txt](https://itemsadder.devs.beer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://itemsadder.devs.beer/russian-work-in-progress/adding-content/scripting.md).

# Scripting

{% hint style="warning" %}

#### Requires ItemsAdder 4.0.10 or greater

This feature is a work in progress and may change, potentially affecting existing configurations and scripts. While I will strive to maintain compatibility, some disruptions are inevitable.
{% endhint %}

ItemsAdder introduces a powerful scripting feature that lets you define advanced item behaviors beyond the built-in events and actions. With scripting, you can create dynamic and complex functionalities.

***

### 🧫 Overview

The scripting engine uses Java or a Java-like language (JSPP) under the hood.

> 📝 **Note**: Scripts written in ItemsAdder are compiled into Java code, ensuring performance equivalent to native server code. Unlike interpreted languages like Skript, there is no runtime interpretation overhead.

#### ↺ Supported Events

The following events are supported for scripting and are triggered by the `events` property in the item.

* `BlockBreakEvent`
* `CustomBlockBreakEventInternal`
* `PlayerInteractEvent`
* `EntityDamageByEntityEvent`
* `EntityDeathEvent`
* `PlayerInteractEntityEvent`
* `PlayerDropItemEvent`
* `PlayerDropHeldItemEvent`
* `EntityShootBowEvent`
* `EntityShootBowArrowEvent`
* `PlayerItemConsumeEvent`
* `FoodLevelChangeEvent`
* `PlayerEditBookEvent`
* `PlayerFishEvent`
* `InventoryClickEvent`
* `ProjectileLaunchEvent`
* `ProjectileHitEvent`
* `PlayerItemHeldEvent`
* `InventoryDragEvent`
* `PlayerPickupItemEvent`
* `PlayerBucketEmptyEvent`
* `PlayerBucketFillEvent`
* `ArmorEquipEvent`
* `PlayerItemBreakEvent`
* `PlayerSwapHandItemsEvent`
* `PlayerEvent`


---

# 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://itemsadder.devs.beer/russian-work-in-progress/adding-content/scripting.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.
