Skip to content

Getting Started

honkling edited this page Jun 3, 2024 · 1 revision

Installation

Commando is currently available from Jitpack. For platforms like Spigot, it also serves as a plugin which you can depend on.

Maven
<dependency>
  <groupId>com.github.honkling.commando</groupId>
  <artifactId>{platform}</artifactId> <!-- ex. "spigot", "fabric" -->
  <version>{commit id}</version> <!-- latest commit ID in Jitpack -->
Gradle (Groovy DSL)
dependencies {
  // platform: ex. "spigot", "fabric"
  // commit id: latest commit id in Jitpack
  implementation "com.github.honkling.commando:{platform}:{commit id}"
}
Gradle (Kotlin DSL)
dependencies {
  // platform: ex. "spigot", "fabric"
  // commit id: latest commit id in Jitpack
  implementation("com.github.honkling.commando:{platform}:{commit id}")
}

Usage

Setting up commando is easy. Just create the command manager for your platform and point it to your commands package.
Using Spigot, for example:

Java
@Override
public void onEnable() {
    // Replace with manager for your platform
    SpigotCommandManager commandManager = new SpigotCommandManager(this);
    commandManager.registerCommands("me.honkling.example.commands");
}
Kotlin
override fun onEnable() {
    // Replace with manager for your platform
    val commandManager = SpigotCommandManager(this)
    commandManager.registerCommands("me.honkling.example.commands")
}
Clone this wiki locally