-
-
Notifications
You must be signed in to change notification settings - Fork 4
Command basics
Berke Akçen edited this page Oct 11, 2025
·
20 revisions
- Getting Started with Command Framework
- Adding Command Framework to Your Project
- Basic Command Parameters
To add this project as a dependency, include the following in your pom.xml
:
<dependency>
<groupId>com.github.despical</groupId>
<artifactId>command-framework</artifactId>
<version>1.5.3</version>
</dependency>
dependencies {
implementation 'com.github.despical:command-framework:1.5.3'
}
This section outlines the essential parameters you can use to define commands within the Command Framework.
Each parameter allows for customization of command behavior and usage.
Parameter | Return Type | Optional | Description |
---|---|---|---|
name | String | FALSE | Name of the command |
fallbackPrefix | String | TRUE | A prefix which is prepended to the command with a ':' one or more times to make the command unique. |
permission | String | TRUE | Permission required to execute the command |
aliases | String Array | TRUE | Alternative names for the command |
desc | String | TRUE | Brief description of the command |
usage | String | TRUE | How to usage the command |
min | Integer | TRUE | Minimum number of required arguments |
max | Integer | TRUE | Maximum number of required arguments |
onlyOp | Boolean | TRUE | Whether only operator (op-ed) players can run this command |
async | Boolean | TRUE | If true, executes the command in a new thread, preventing main thread blockage. Ideal for time-consuming tasks. |
senderType | SenderType | TRUE | Type of sender (e.g., BOTH, PLAYER, CONSOLE) |