The BattlePlugin provides 2 events that you can listen to.
BattleStartedEvent
and BattleStoppedEvent
They provide information about the Battle at start and if it was cancelled at stop.
You can listen to them like any other Bukkit event.
To get these events into your project on Maven.
- Add the JitPack repository to your build file
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
- Add this dependency
<dependency>
<groupId>com.github.JoKrus</groupId>
<artifactId>dj-battle-plugin-api</artifactId>
<version>v1.2.0</version>
<scope>provided</scope>
</dependency>