An example add-on for PulsePrison demonstrating how to use its Developer API. This guide will serve as a foundation for creating your own extensions, custom enchantments, currencies, and integrations.
- Obtaining the API: Safely using
PulsePrisonProvider.get()insideonEnable. - Events (Listeners): Listening to and modifying or cancelling PulsePrison's custom events, such as
PlayerRebirthEvent,MineResetEvent,MarketPriceChangeEvent, andPlayerLevelUpEvent. - Custom Actions: Registering a custom action tag (e.g.,
[heal]) that can be used in any GUI menu or leveling reward in the core plugin. - Custom Enchantments: Creating a Java-based enchantment (
BaseEnchant) that hooks directly into the mining pipeline, utilizing per-level probability rates. - Live Data Command: The
/prisonaddoncommand demonstrates how to fetch dynamic market data, custom currency balances, and player progression statistics in real-time.
- Clone this repository.
- Create a folder named
libsin the root directory. - Place your PulsePrison (v2.0+)
.jarfile inside thelibsfolder. - Run
./gradlew buildto compile the project. - The generated
.jarfile will be located inbuild/libs/.