Developer API
SmartSpawner provides a Java API for reading and modifying spawners, listening to lifecycle events, and extending plugin behavior.
Quick Navigation
Installation
Add SmartSpawner as a dependency with JitPack.
API Creation
Get the API instance and initialize your integration.
Data Access
Read and modify stack size, storage, experience, and other properties.
Events
Listen to spawner placement, removal, generation, selling, and other lifecycle events.
GUI Layout API
Register and inject custom GUI layout providers.
Validation
Validate spawner data and supported mob types.
Examples
Follow complete examples for common integration patterns.
Overview
The API follows a provider pattern:
java
SmartSpawnerAPI api = SmartSpawnerProvider.getAPI();It supports:
- Reading and modifying spawner properties such as stack size, delay, and range
- Accessing and changing stored items and experience
- Creating and removing spawners programmatically
- Listening to placement, break, generation, and selling events
- Registering custom GUI layout providers
- Validating mob types and spawner data
