Documentation Index
Fetch the complete documentation index at: https://mintlify.com/ProjectUnified/CraftCommand/llms.txt
Use this file to discover all available pages before exploring further.
CraftCommand is split into focused modules that follow a consistent pattern: one annotations artifact that your source code compiles against, one runtime artifact that ships with your application, and one processor artifact that the Java compiler consumes during annotation processing to generate the platform-native wrapper classes. Because each module is versioned independently on Maven Central, the craftcommand-bom (Bill of Materials) is the recommended way to pin all modules to a single coherent release without repeating version numbers everywhere.
Using the BOM
Add the BOM as an import-scoped dependency in your project’s <dependencyManagement> block. After this, every craftcommand-* dependency you declare in <dependencies> can omit the <version> tag — Maven resolves it automatically from the BOM.
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-bom</artifactId>
<version>0.5.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
All individual CraftCommand module versions are managed by the BOM. Do not specify <version> on modules like craftcommand-annotations or craftcommand-standalone-runtime once the BOM is imported — doing so overrides the BOM and may lead to version mismatches across modules.
Standalone
Bukkit / Spigot
Paper
Use these modules for any plain Java application (CLI tool, bot, service, etc.) with no Minecraft dependency.Runtime dependencies
Add both artifacts to your <dependencies>. No version is needed when the BOM is imported.<dependencies>
<!-- Core annotations: @Command, @Subcommand, @Default, @Optional, etc. -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-annotations</artifactId>
</dependency>
<!-- Standalone runtime: StandaloneCommandManager, StandaloneCommand -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-standalone-runtime</artifactId>
</dependency>
</dependencies>
Annotation processor
Register craftcommand-standalone-processor inside <annotationProcessorPaths> of the maven-compiler-plugin. The processor generates YourCommand_Standalone wrapper classes during compilation.<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-standalone-processor</artifactId>
<version>0.5.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Use these modules for Bukkit or Spigot Minecraft server plugins. The runtime wraps the Bukkit Command API so your annotated class registers natively with the plugin’s command map.Runtime dependencies
<dependencies>
<!-- Core annotations -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-annotations</artifactId>
</dependency>
<!-- Bukkit runtime -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-bukkit-runtime</artifactId>
</dependency>
<!-- Optional: Bukkit-specific annotations such as @Permission -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-bukkit-annotations</artifactId>
</dependency>
</dependencies>
Annotation processor
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-bukkit-processor</artifactId>
<version>0.5.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Use these modules for Paper Minecraft server plugins to get full Brigadier integration — client-side argument completion, typed argument nodes, and richer command suggestions.Runtime dependencies
<dependencies>
<!-- Core annotations -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-annotations</artifactId>
</dependency>
<!-- Paper runtime with Brigadier support -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-paper-runtime</artifactId>
</dependency>
</dependencies>
Annotation processor
craftcommand-paper-processor generates full Brigadier command trees. If your environment does not support Brigadier, use craftcommand-paper-processor-basic as a fallback — it generates simpler wrappers without native Brigadier integration.<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<!-- Full Brigadier processor (default) -->
<path>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-paper-processor</artifactId>
<version>0.5.1</version>
</path>
<!-- Swap the above for this if Brigadier is unavailable: -->
<!--
<path>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-paper-processor-basic</artifactId>
<version>0.5.1</version>
</path>
-->
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Validation module (optional)
The validation module is a platform-independent add-on that works with any of the platforms above. It provides parameter-level annotations (@Min, @Max, @ValidateWith, etc.) that are woven into the generated wrapper classes at compile time, so violations are caught before your method body runs.
Dependency
<dependencies>
<!-- Validation annotations: @Min, @Max, @ValidateWith, etc. -->
<dependency>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-validation-annotations</artifactId>
</dependency>
</dependencies>
Annotation processor path
Add craftcommand-validation-processor alongside your platform processor inside <annotationProcessorPaths>:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<!-- Your platform processor (standalone shown here) -->
<path>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-standalone-processor</artifactId>
<version>0.5.1</version>
</path>
<!-- Validation processor -->
<path>
<groupId>io.github.projectunified</groupId>
<artifactId>craftcommand-validation-processor</artifactId>
<version>0.5.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
Annotation processors must be declared inside <annotationProcessorPaths> in the maven-compiler-plugin configuration — not as regular <dependencies>. Adding a processor to <dependencies> alone will not cause it to run during compilation, and no wrapper classes will be generated.