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.
How to create a CommandHelp ?
At this point, you should have something like this in your command resource 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
Example
{
"item": {
"commandHelp": {
"minOfCommands": 3,
"commandsPerPage": 4,
"previousPage": ["&7[&b<&7]", "&bPrevious page", "&7[<]", ""],
"nextPage": ["&7[&b>&7]", "&bNext page", "&7[>]", ""],
"pagination": [" ", "%previous_page%", " ", "%next_page%", " &6- &ePage ", "%page%"],
"format": [
"&6----------------------------",
" ",
"%usages%",
" ",
"%pagination%",
" ",
"&6----------------------------"
]
}
}
}
Last updated