# 🛠️ Developer API

Welcome to the **VortexSellChests API**. This API allows developers to hook into the sell chest system, listen for transaction events, and programmatically manage chest tiers, boosters, and energy levels.&#x20;

{% hint style="info" %}
You can browse our available API versions and artifacts directly in your browser at our [repositiory](https://repo.vortexdevelopment.net/#browser).
{% endhint %}

***

#### 📦 Dependency Management

To use the API, you need to add our Maven repository and the API dependency to your project.

**Maven**

Add the following to your `pom.xml`:

```xml
<repository>
    <id>vortex-repo</id>
    <url>https://repo.vortexdevelopment.net/repository</url>
</repository>

<dependency>
    <groupId>net.vortexdevelopment</groupId>
    <artifactId>VortexSellChests-API</artifactId>
    <version>latest</version> <!-- Or use a specific version -->
    <scope>provided</scope>
</dependency>
```

**Gradle (Groovy)**

Add the following to your `build.gradle`:

```kotlin
repositories {
    maven {
        url = uri("https://repo.vortexdevelopment.net/repository")
    }
}

dependencies {
    compileOnly 'net.vortexdevelopment:VortexSellChests-API:1.0.1'
}
```

***

#### 🚀 Getting Started

**Accessing the API**

The main entry point for the API is the `VortexSellChestsApi` class. Note that you should always check if the plugin is enabled before accessing managers, as they are initialized during the plugin load phase. All managers are statically accessible:

**💠 API Modules**

```java
@NotNull VortexSellChestsApi.getSellChestManager();
@NotNull VortexSellChestsApi.getBoosterManager();
```

* The API is split into several modules to keep things organized:
* **SellChestManager**: Programmatically manage placed chests, retrieve chest properties (multiplier, radius), and track ownership data.
* **BoosterManager**: Control the activation and tracking of multipliers for items sold or collected across the server.

***

#### 🔔 Events

VortexSellChests fires custom events that you can listen to in your own plugins:

* **ChestSellItemEvent**: Fired when a chest successfully sells items. Useful for logging transactions or modifying the payout amount.
* **ChestCollectItemEvent**: Fired when a collector or sell chest "vacuums" an item from the ground.

***

#### 📄 Plugin.yml

If you are depending on VortexSellChests, don't forget to add it to your `plugin.yml` to ensure proper load order:

```yaml
depend: [VortexSellChests] # OR
softdepend: [VortexSellChests]
```


---

# 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://wiki.vortexdevelopment.net/projects/vortexsellchests/developer-api.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.
