Developer API
The TNT Run API allows developers to hook into game lifecycles, track player statistics, modify double jump behavior, and react to player eliminations. All custom events in the plugin inherit from the base TNTRunEvent class.
Dependency Setup
Section titled “Dependency Setup”To start using the API, you need to add the TNT Run JAR file to your project’s dependencies. Create a folder named libs in your project’s root directory and place the tnt-run-x.x.x.jar file inside it.
dependencies { compileOnly files('libs/tnt-run-x.x.x.jar')}dependencies { compileOnly(files("libs/tnt-run-x.x.x.jar"))}<dependency> <groupId>dev.despical</groupId> <artifactId>tnt-run</artifactId> <version>LATEST</version> <scope>system</scope> <systemPath>${project.basedir}/libs/tnt-run-x.x.x.jar</systemPath></dependency>name: YourPluginversion: 1.0.0main: your.package.Maindepend: [TNTRun]Base Event Class
Section titled “Base Event Class”Every event provided by the TNT Run API extends the TNTRunEvent class. This shared base type acts as the root for all custom Bukkit events fired by the plugin.
public abstract class TNTRunEvent extends Event {}Concrete event classes each provide their own Bukkit HandlerList, so you should listen to the specific event you need instead of trying to listen to TNTRunEvent directly.
Next Steps
Section titled “Next Steps”Explore the different event categories to start building your integration: