πŸ› οΈ 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.

circle-info

You can browse our available API versions and artifacts directly in your browser at our repositioryarrow-up-right.


πŸ“¦ 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:

<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:


πŸš€ 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

  • 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:

Last updated