Welcome to the VortexPrisonCore API. This API allows developers to hook into the prison system, listen for custom events, and programmatically manage player data, mines, pickaxes, enchants, and more.
You can browse our available API versions and artifacts directly in your browser at our repositiory.
📦 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>VortexPrisonCore-API</artifactId><version>latest</version><!-- Use 'latest' or 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 VortexPrisonCoreApi class. Note that you should always check if the plugin is enabled before accessing it. Additionally, each manager for specific modules can be null if that module is disabled in the configuration. All methods are statically accessible from the VortexPrisonCoreApi class.
💠 API Modules
The API is split into several modules to keep things organized:
MineManager: Handle mine creation, retrieval, and interact with prison mines.
PickaxeManager: Programmatically manage player pickaxes, their levels, and metadata.
EnchantManager: Access and manage custom enchantments applied to pickaxes.
TokenManager: Interact with the custom token economy system.
RankManager: Manage player ranks and prestiges.
BackpackManager: Programmatically interact with player backpacks and their contents.
AutoSellManager: Manage the auto-sell system and sell multipliers.
BombsManager: Interact with the custom bomb system for mining.
EconomyManager: Access the main economy system (Vault integration).
BoosterManager: Manage active global or personal boosters.
VoucherManager: Create and manage redeemable vouchers.
PlayerDataManager: Access and modify persistent player data (Gems, Stats, etc.).
🔔 Events
VortexPrisonCore fires several custom events that you can listen to in your own plugins:
MineBlockBreakEvent: Fired when a player breaks a block inside a prison mine.
MineBlockPlaceEvent: Fired when a player places a block inside a prison mine.
AsyncMineEnterEvent: Fired asynchronously when a player enters a mine region.
AsyncMineLeaveEvent: Fired asynchronously when a player leaves a mine region.
AddExperienceEvent: Fired when a player gains experience (Pickaxe, Rank, etc.).
InventoryItemAddEvent: Fired when an item is added to an inventory via core systems (AutoSell, Backpacks).
📄 Plugin.yml
If you are depending on VortexPrisonCore, don't forget to add it to your plugin.yml to ensure proper load order: