Developer API
SmartSpawner provides a clean Java API that lets you interact with spawners, listen to events, and modify behavior from your own plugins.
Quick Navigation
Installation
Add SmartSpawner as a dependency via JitPack (Maven / Gradle).
API Creation
Get the API instance and initialize your integration.
Data Access
Read and modify spawner data: stack size, storage, XP, etc.
Events
Listen to spawner lifecycle events in your plugin.
GUI Layout API
Register and inject custom GUI layout providers.
Validation
Validate spawner data and entity types.
Examples
Complete working examples to get started quickly.
Overview
The API is available via JitPack and follows a provider pattern:
java
SmartSpawnerAPI api = SmartSpawnerProvider.getAPI();The API gives you access to:
- Reading and modifying spawner properties (stack size, delay, range)
- Accessing and modifying spawner storage contents
- Creating and removing spawners programmatically
- Listening to spawner events (place, break, generate, sell, etc.)
- Registering custom GUI layout providers
- Validating entity types and spawner data