Skip to content

Frequently Asked Questions

Daniel Ennis edited this page May 25, 2017 · 12 revisions

Below you may find one off bits of information that are too small to have their own page, or may be important enough to call out again even if it is mentioned elsewhere

For non Bukkit platforms, replace CommandSender/Player with the source command issuer of your platform in use.

How do I handle commands with no arguments (The root command)

Create any command like so:

@Default
public void onDefault(CommandSender/Player player) { 
    // Command
}

How do I put each of my subcommands in their own file

Per Command Organization, it is recommended to simply keep your related subcommands in the same file, and only move distinctive groupings to another file. If you still wish to, see the Command Organization page for details.

How do I change the syntax message of the command

You may add the ```java @Syntax("Anything here")


However, if you simply want to change the name of the parameter, the automatic syntax generation will use the parameter name as-is, so you could(should) just rename the parameter.

## My parameter names in syntax are "arg1" etc
You missed the step about adding -parameters to the compiler. See the [Maven](Maven-Setup)/[Gradle](Gradle-Setup) setup guides.

## How can I change the messages such as Permission Messages?
This is on the near term roadmap as part of a larger project to make the command system support I18N in a really professional way.