Skip to content

alexissdev/CommandFlow

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CommandFlow Codacy Badge

A flexible command framework which removes lots of boilerplate code used in commands.

Usage

The command framework is divided into two parts. One is the actual command framework and the other one is the API to allow creation of a complete command tree based on annotations.

Components of the Command Framework

There are some basic components that you should at least be aware of to use CommandFlow

  • Command: This is the most fundamental component, the Command. It contains all the information related to a command, included but not limited to name, aliases, permission, parts, etc. Those are created using the Command.builder(String) method, which returns an Command.Builder instance where you can set all the information of the command.

  • CommandPart: This is the second most fundamental component, it can be understood as every argument of a Command, including things like subcommands, flags, non positional arguments, etc. It can use arguments from the argument list, or provide them using any other means also they can forward the parsing to another part and just act as a modifier. Most of the default parts can be found at the class Parts

  • CommandContext: This is a mutable object which contains the context for the called command including but not limited to the values for every part parsed, the raw arguments list and the raw arguments for every part, the labels and the Command execution path(which path of subcommands was taken).

Maven

Repository:

<repository>
  <id>unnamed-snapshots</id>
  <url>https://repo.unnamed.team/repository/unnamed-snapshots/</url>
</repository>

Dependency:

<dependency>
  <groupId>me.fixeddev</groupId>
  <artifactId>commandflow-universal</artifactId>
  <version>0.1.0-SNAPSHOT</version>
</dependency>

About

A flexible and easy command manager

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%