CommandHelp

This is a guide to learn how to add a page system in chat for your command aid system.

What is CommandHelp ?

CommandHelp is a class which allows you to create a pages in chat for your command aid system. This page system allows you, when you have a lot of commands, to display their usage in a structured way to the user.

A CommandUsage must be created to use this feature.

How to create a CommandHelp ?

At this point, you should have something like this in your command resource file.

Remember that my command's name is item so I will write the following codes into the command_item.json file.

{
  "item": {}
}

To create a CommandMessage, write the following code into the item section:

"commandHelp": {}

So you should have something like this:

{
  "item": {
    "commandHelp": {}
  }
}

CommandHelp properties

Let's see the available properties of the commandHelp section:

Type

Property

Description

minOfCommands

int

The min number of commands to show page system, top and bottom messages

commandsPerPage

int

The max number of commands per page

previousPage

String[]

The previous page (see here for more information)

nextPage

String[]

The next page (see here for more information)

pagination

String[]

The page system format (see here for more information)

format

String[]

The help message format (see here for more information)

Example

Last updated