/LiteCommands

☄️ LiteCommands - Annotation based Command framework for Velocity, Bukkit, Paper, BungeeCord, Minestom and your other implementations.

Primary LanguageJavaApache License 2.0Apache-2.0

banner

☄️ LiteCommands dependency Donate Discord OSCS Status

Command framework for Velocity, Bukkit, Paper, BungeeCord and your other implementations.

Helpful links:

Panda Repository (Maven or Gradle) ❤️

<repository>
    <id>panda-repository</id>
    <url>https://repo.panda-lang.org/releases</url>
</repository>
maven { url "https://repo.panda-lang.org/releases" }

Dependencies (Maven or Gradle)

Framework Core

<dependency>
    <groupId>dev.rollczi.litecommands</groupId>
    <artifactId>core</artifactId>
    <version>2.8.9</version>
</dependency>
implementation 'dev.rollczi.litecommands:core:2.8.9'

First Simple Command

/helloworld <text...>
/helloworld other-solution <text...>
/helloworld subcommand <text>

@Route(name = "helloworld")
@Permission("dev.rollczi.helloworld")
public class HelloWorldCommand {

    @Execute
    @Min(1)
    public void command(LiteSender sender, @Args String[] args) {
        sender.sendMessage(String.join(" ", args));
    }

    @Execute(route = "other-solution")
    @Min(1)
    public void otherSolution(LiteSender sender, @Joiner String text) {
        sender.sendMessage(text);
    }

    @Execute(route = "subcommand")
    public void subcommand(LiteSender sender, @Arg String text) {
        sender.sendMessage(text);
    }

}

Register your first command in plugin main class: (in this case for Velocity)

this.liteCommands=LiteVelocityFactory.builder(proxy)
    .command(HelloWorldCommand.class)
    .register();

Velocity Extension Dependencies (Maven or Gradle)

Add this to your dependencies if you want use ready-made implementation for velocity.

<dependency>
    <groupId>dev.rollczi.litecommands</groupId>
    <artifactId>velocity</artifactId>
    <version>2.8.9</version>
</dependency>
implementation 'dev.rollczi.litecommands:velocity:2.8.9'

Add -parameters to your compiler to use all features of LiteCommands

tasks.withType(JavaCompile) {
    options.compilerArgs << "-parameters"
}
tasks.withType<JavaCompile> {
    options.compilerArgs.add("-parameters")
}
<plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-compiler-plugin</artifactId>
  <version>3.8.1</version>
  <configuration>
    <compilerArgs>
      <arg>-parameters</arg>
    </compilerArgs>
  </configuration>
</plugin>

All extensions:

Other examples:

See (Important dependencies used)

Plugins that use LiteCommands: