A command library for Hytale.
If you are using gradle with kotlin, you will need to add the following to your build.gradle:
implementation("io.github.Danixd12:HyperCommand:VERSION")If instead, you prefer maven, add this to your pom.xml:
<dependency>
<groupId>io.github.Danixd12</groupId>
<artifactId>HyperCommand</artifactId>
<version>VERSION</version>
</dependency>Don't worry, on the Maven Central you can find all the snippets for other build systems
Latest version is available at the releases tab
The main goal is to abstract the creation of commands.
This library allows you to make complex commands in a few lines. Let's see an example:
@Command(
name = "test",
aliases = {"t", "t1"},
permissions = "cmd.test"
)
public class TestCommand {
CommandContext ctx;
@ParentCommand
void parent() {
ctx.sendMessage(Message.raw(
"Hello " + ctx.sender() + ", from parent!"
));
}
@SubCommand(
name = "subtest",
permissions = "cmd.subtest"
)
void hello(@Arg String name,
@Arg(required = false) int age) {
ctx.sendMessage(Message.raw(
"Hello " + name + ", you are " + age + " years old"
));
}
}The documentation will improve over time, and will eventually get his own wiki page.
Thank you for reading.
This library is brought to you under an Open Source Library, for more info about what you can and can't do, please read LICENSE