Skip to main content

API Usage

This guide explains how to integrate the new and improved VehiclesPlus API (v3) into your project.

Adding VehiclesPlus to Your Project​

To use the VehiclesPlus API in your plugin, follow these steps:

Step 1: Add VehiclesPlus to Your Dependencies​

Ensure VehiclesPlus is added as a dependency in your project. To always use the latest version, update your dependency configuration as shown below:

Maven (pom.xml):

<!-- Append to the <repositories> section -->
<repositories>
<repository>
<id>sbdevelopment-repo</id>
<url>https://repo.sbdevelopment.tech/releases</url>
</repository>
</repositories>

<!-- Append to the <dependencies> section -->
<dependencies>
<dependency>
<groupId>nl.sbdeveloper</groupId>
<artifactId>VehiclesPlus-API</artifactId>
<version>3.0.6</version>
</dependency>
</dependencies>

Gradle (build.gradle):

repositories {
maven {
url 'https://repo.sbdevelopment.tech/releases'
}
}

dependencies {
implementation 'nl.sbdeveloper:VehiclesPlus-API:3.0.6'
}
info

Note: Using latest ensures that your project always fetches the most recent release, but it might cause issues if breaking changes are introduced. For more stability, consider specifying a specific version (e.g., 3.0.2).

Next steps​

  • API reference — every VehiclesPlusAPI method, grouped by purpose, plus the vehicle object model.
  • Events — listen to and cancel what happens in-game (spawning, buying, despawning, upgrading…).
  • Examples — ready-to-copy snippets.

API Documentation​

For additional details and advanced usage refer to the official VehiclesPlus Javadoc.