SuperiorSkyblock2 provides a comprehensive event system with over 110 events that allow developers to hook into nearly every aspect of island functionality, player actions, and plugin lifecycle.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/BG-Software-LLC/SuperiorSkyblock2/llms.txt
Use this file to discover all available pages before exploring further.
Event Categories
Events are organized into the following categories:- Island Events - Island lifecycle, configuration, and management events
- Player Events - Player-specific actions and state changes
- Block Events - Block stacking and manipulation events
- Mission Events - Mission completion and progress tracking
- Plugin Events - Plugin initialization and data loading
Base Event Classes
IslandEvent
All island-related events extend fromIslandEvent, which provides:
IslandEvent automatically handles async event execution when called from non-primary threads.
Listening to Events
Basic Event Listener
Cancellable Events
Many events implementCancellable, allowing you to prevent actions:
Priority and Async Handling
Events that extend IslandEvent are automatically marked as async when not called from the primary thread. Be careful when accessing Bukkit API from async events.
Event Registration
Register your listener in your plugin’sonEnable() method:
Common Event Patterns
Pre and Post Events
Some operations have both pre and post events:Enter and Leave Events
Change Events
Many “Change” events allow you to modify or cancel configuration changes:Event Flow Examples
Island Creation Flow
PreIslandCreateEvent(cancellable)- Island object is created
IslandCreateEvent(cancellable)- Schematic is pasted
IslandSchematicPasteEventPostIslandCreateEvent
Island Worth Calculation Flow
- Worth calculation starts
- Blocks are scanned
IslandWorthCalculatedEvent(async)IslandWorthUpdateEvent
Best Practices
- Check for null: Some events have nullable fields (e.g.,
@Nullable SuperiorPlayerwhen console executes commands) - Use appropriate priorities: Use
EventPriority.LOWfor early checks,EventPriority.HIGHfor final modifications - Avoid heavy operations in events: Events are called frequently; cache data when possible
- Handle async events safely: Many island calculation events run async; avoid direct Bukkit API calls
Thread Safety
Next Steps
- Island Events - Explore all island-related events
- Player Events - Learn about player-specific events
- Block Events - Understand block manipulation events
Additional Resources
For the complete list of all 110+ events, browse the source code or use your IDE’s autocomplete with the
com.bgsoftware.superiorskyblock.api.events package.