docs: update vehiclesplus-v3/API
This commit is contained in:
parent
4958a683ec
commit
3cc7d84c54
1 changed files with 6 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
title: API
|
title: API
|
||||||
description: Api usage examples
|
description: Api usage examples
|
||||||
published: false
|
published: false
|
||||||
date: 2024-12-28T20:38:34.412Z
|
date: 2024-12-28T20:40:27.836Z
|
||||||
tags: developers
|
tags: developers
|
||||||
editor: markdown
|
editor: markdown
|
||||||
dateCreated: 2024-12-28T20:10:42.650Z
|
dateCreated: 2024-12-28T20:10:42.650Z
|
||||||
|
@ -17,9 +17,11 @@ This guide explains how to integrate the new and improved VehiclesPlus API (v3)
|
||||||
To use the VehiclesPlus API in your plugin, follow these steps:
|
To use the VehiclesPlus API in your plugin, follow these steps:
|
||||||
|
|
||||||
### Step 1: Add VehiclesPlus to Your Dependencies
|
### 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:
|
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`):
|
Maven (`pom.xml`):
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<repository>
|
<repository>
|
||||||
<id>sbdevelopment-repo</id>
|
<id>sbdevelopment-repo</id>
|
||||||
|
@ -34,6 +36,7 @@ Maven (`pom.xml`):
|
||||||
```
|
```
|
||||||
|
|
||||||
Gradle (`build.gradle`):
|
Gradle (`build.gradle`):
|
||||||
|
|
||||||
```gradle
|
```gradle
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
|
@ -45,14 +48,13 @@ dependencies {
|
||||||
implementation 'tech.sbdevelopment:vehiclesplus:latest'
|
implementation 'tech.sbdevelopment:vehiclesplus:latest'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
> **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`).
|
|
||||||
|
|
||||||
|
> **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`).
|
||||||
|
|
||||||
## Example: Adding a Car to Someone's Garage
|
## Example: Adding a Car to Someone's Garage
|
||||||
|
|
||||||
This example demonstrates how to add a vehicle to any garage:
|
This example demonstrates how to add a vehicle to any garage:
|
||||||
|
|
||||||
|
|
||||||
```java
|
```java
|
||||||
// Give car to garage
|
// Give car to garage
|
||||||
public void giveCar(Garage garage, String vehicleType) {
|
public void giveCar(Garage garage, String vehicleType) {
|
||||||
|
@ -101,4 +103,4 @@ public void giveCar(Player player, String vehicleType) {
|
||||||
|
|
||||||
## API Documentation
|
## API Documentation
|
||||||
|
|
||||||
For additional details, examples, and advanced usage, refer to the official [VehiclesPlus API Docs](https://sbdevelopment.tech/vehiclesplus).
|
For additional details, examples, and advanced usage, refer to the official [VehiclesPlus API Docs](https://sbdevelopment.tech/vehiclesplus).
|
Reference in a new issue