Skip to content

Command basics

Berke Akçen edited this page Mar 20, 2024 · 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.4.2</version>
    <scope>compile</scope>
</dependency>

Gradle dependency

repositories {
    maven { url 'https://jitpack.io' }
}
dependencies {
    implementation 'com.github.Despical:CommandFramework:1.4.2';
}

Basic command parameters

Parameter Return Type Optional Description
name String FALSE Name of the command
permission String TRUE Permission of the command
aliases String Array TRUE Aliases of the command
desc String TRUE Description of the command
usage String TRUE Usage of the command
min Integer TRUE Minimum length of required
arguments
max Integer TRUE Maximum length of required
arguments
allowInfiniteArgs Boolean TRUE Allows command to take infinite
arguments
onlyOp Boolean TRUE Only op-ed players can run
this command
async Boolean TRUE Runs the command in a new thread
senderType SenderType TRUE Type of sender eg. BOTH, PLAYER
CONSOLE
Clone this wiki locally