Skip to content
This repository has been archived by the owner on Jan 28, 2020. It is now read-only.

bizarre/honcho1

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 

Repository files navigation

Honcho

Honcho is a Bukkit command framework that speeds up command creation via annotations.

What can I do?

We're not reinventing the wheel, but here are a couple things that Honcho can do:

  • Easily create commands and subcommands using annotations.
  • Convert user input directly into objects to use in commands.
  • Automatically instantiate nested subcommands.
  • Dynamically generate command usage to display to user.

Getting Started

Installation

To use Honcho in your project, add this repository to your pom.xml:

<repository>
    <id>qrakn-repo</id>
    <url>http://hub.qrakn.com/nexus/repository/snapshots/</url>
</repository>

and then add this to your maven project's dependencies:

<dependency>
    <groupId>com.qrakn</groupId>
    <artifactId>honcho</artifactId>
    <version>1.0-SNAPSHOT</version>
    <scope>compile</scope>
</dependency>

Usage

Note: Honcho requires at least Java 8 to make use of parameter names.

Kotlin Example - A command that broadcasts a message in chat (/broadcast <message>)

@CommandMeta(label = ["broadcast"])
class BroadcastCommand {

  fun execute(sender: CommandSender, message: String) {
    Bukkit.broadcastMessage("${ChatColor.AQUA}$message");
  }

}

Java Example - A command that broadcasts a message in chat (/broadcast <message>)

@CommandMeta(label = "broadcast")
public class BroadcastCommand {

  public void execute(CommandSender sender, String message) {
    Bukkit.broadcastMessage(ChatColor.AQUA + message);
  }

}

Result (Honcho automatically generates command usage and converts String[] arguments into a single String)

img

About

command framework

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages