Skip to content

Installation Guide

Traqueur edited this page Jul 4, 2025 · 3 revisions

πŸ“¦ CommandsAPI – Installation Guide

This guide explains how to install and set up CommandsAPI in your Java plugin project.


βœ… Requirements

  • Java 8 (for spigot) and Java 21 (for velocity) or higher
  • Spigot / Paper / Velocity / other supported platforms
  • A build system like Gradle or Maven

πŸ“₯ Adding the Dependency

CommandsAPI is hosted via JitPack, so make sure to include it in your repository section.

πŸ’‘ Important: Each platform (Spigot, Velocity, etc.) has its own artifactId. Use the one that matches your environment.

Gradle Example

repositories {
    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.Traqueur-dev.CommandsAPI:platform-spigot:VERSION'
    // Replace "platform-spigot" with your platform: spigot, velocity, etc.
}

Maven Example

<repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.github.Traqueur-dev.CommandsAPI</groupId>
        <artifactId>platform-spigot</artifactId>
        <version>VERSION</version>
    </dependency>
</dependencies>

Replace:

  • VERSION β†’ with the latest release (e.g., 4.0.0)
  • platform-spigot β†’ with your platform: platform-velocity, platform-bungee, etc.

🚨 Relocation Required

To avoid potential classpath conflicts with other plugins that also use CommandsAPI, it is strongly recommended to relocate the library when shading it in your final JAR.

In Gradle (with Shadow plugin):

shadowJar {
    relocate 'fr.traqueur.commands', 'your.plugin.lib.commandsapi'
}

πŸ§ͺ Verifying the Setup

Once added:

  • Run a clean build to ensure the library is downloaded
  • Check that your IDE resolves classes like Command, CommandManager, etc.
  • Try registering a simple command to test the integration

You're now ready to start building advanced and flexible command systems with CommandsAPI! πŸš€

Clone this wiki locally