Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.
/ SimpleCommand Public archive

A simple library for creating various commands to be used anywhere (e.g. in the console).

License

Notifications You must be signed in to change notification settings

einrobin/SimpleCommand

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Commands

A library to create simple commands for anything. They can be executed in the console, in a web panel or what ever you want.

Getting started

Maven:

<repository>
    <id>jitpack</id>
    <url>https://jitpack.io</url>
</repository>

<dependency>
    <groupId>com.github.derrop</groupId>
    <artifactId>simplecommand</artifactId>
    <version>1.2-RELEASE</version>
</dependency>

Gradle:

maven {
    name 'jitpack'
    url 'https://jitpack.io'
}

compile group: 'com.github.derrop', name: 'simplecommand', version: '1.2-RELEASE'

With that being done, you can now create your DefaultCommandMap to register your commands.

Your first command could like this, register it in your CommandMap by using the registerSubCommands method.

When you have created your commands, you can dispatch them by using the dispatchCommand or dispatchConsoleCommand methods in your CommandMap.

Use custom messages

If you want to use your own messages, you can just call the static method CommandTranslator.useCustomMessages, this function will map the message key to a message. Every message can be found in the DefaultMessages class.

About

A simple library for creating various commands to be used anywhere (e.g. in the console).

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages