Skip to content

Command basics

Berke Akçen edited this page Feb 19, 2021 · 19 revisions

Table of contents

Before Using Command Framework

The project isn't in the Central Repository yet, so specifying a repository is needed.
To add this project as a dependency to your project, add the following to your pom.xml:

Maven dependency

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>
<dependency>
    <groupId>com.github.Despical</groupId>
    <artifactId>CommandFramework</artifactId>
    <version>1.0.0</version>
    <scope>compile</scope>
</dependency>

Gradle dependency

repositories {
    maven { url 'https://jitpack.io' }
}
dependencies {
    compileOnly group: "com.github.Despical", name: "CommandFramework", version: "1.0.0";
}

Basic command parameters

Parameter Return Type Description
name String Name of the command
permission String Permission of the command
aliases String Array Aliases of the command
desc String Description of the command
usage String Usage of the command
min Integer Minimum length of required
arguments
max Integer Maximum length of required
arguments
cooldown Integer Time between using command
again
senderType SenderType Type of sender eg. BOTH, PLAYER
CONSOLE
Clone this wiki locally