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

Latest commit

 

History

History
44 lines (30 loc) · 1.51 KB

README.md

File metadata and controls

44 lines (30 loc) · 1.51 KB

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.