Java API and events
Solar registers dragon.me.solar.api.SolarAPI with Bukkit’s services manager while enabled. Add Solar as a compile-time dependency to access the API types, then load the service:
SolarAPI solar = Bukkit.getServicesManager().load(SolarAPI.class);if (solar == null) { return;}The API is split into four managers:
getMatchAPI()looks up a match by match UUID or player UUID.getQueueAPI()looks up a queue by name.getPlayerStatsAPI()reads wins, losses, and ELO by player UUID and kit/queue ID.getKitAPI()looks up a kit, applies the base kit, or applies a player’s saved layout when available.
Lookups that may not find an object return Optional. Player statistics return 0 when the requested stat does not exist; ELO uses the configured default.
Match events
Section titled “Match events”Solar fires these Bukkit events:
| Event | When it fires | Data |
|---|---|---|
MatchRoundStartEvent |
A round is started | Match |
MatchStartEvent |
The first round has been prepared | Match |
MatchRoundEndEvent |
A round ends with a winner | Match and winning team |
MatchEndEvent |
The complete match ends | Match, end reason, and winning team |
The Match view includes its UUID, state, players, kit, arena, spectators, round target, current round, FFA status, start time, and teams. Match end reasons are COMPLETE, FORFEIT, and TERMINATED.
Optional integrations
Section titled “Optional integrations”- PlaceholderAPI registers Solar’s expansion when the plugin is present; see PlaceholderAPI.
- Intave punishments issued while a player is in a Solar match terminate that match.
- FAWE is required for arena schematic operations.
The source also contains Skript-related classes, but Solar does not currently register a Skript addon at startup.