Skip to content

Yellowstrawberrys/Commander

Repository files navigation

Commander

Makes Minecraft command more developer-friendly.


Use

Warning

This library only works with Paper & Folia

You can implement this library with

Gradle

repositories {
    maven {
        name = "roinSnapshots"
        url = uri("https://repo.roinz.xyz/snapshots")
    }
}

dependencies {
    implementation "xyz.yellowstrawberry:Commander:1.0.3-SNAPSHOT"
}

Maven

<repositories>
    <repository>
        <id>roin-snapshots</id>
        <name>Roin Repository</name>
        <url>https://repo.roinz.xyz/snapshots</url>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>xyz.yellowstrawberry</groupId>
        <artifactId>Commander</artifactId>
        <version>1.0.3-SNAPSHOT</version>
    </dependency>
</dependencies>

Code Example

YourPlugin.java

public class YourPlugin extends JavaPlugin {
    Commander commander = new Commander(this);
    
    public void onEnable() {
        commander.registerCommands(new CustomCommand());
    }
    
    // ...
}

CustomCommand

@Command("hello")
public class CustomCommand {

    @CommandListener(target = CommandTarget.PLAYER)
    public Component execute() {
        return Component.text("Hello, Commander!");
    }

    @SubCommand("world")
    public Component subcommand() {
        return Component.text("Hello, World!");
    }
    
    // ...
}

About

Makes Minecraft command listener looks better and developer-friendly.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy