ApiBuilder
This is a guide to learn how to initialize SmartCommands using the ApiBuilder class.
Initialize the API
To use SmartCommands
, you must first initialize the API using the ApiBuilder
class. First, create a new instance of the internal class ApiBuilder
.
new SmartCommandsAPI.ApiBuilder()
ApiBuilder properties
Property
Default value
debug
false
commandsFilePath
"commands.json"
You can change the value of these properties using the following methods.
Method
Description
debug(boolean debug)
Set true
to enable the debugger or else set false
setCommandsFolderPath(String path)
Set the path of the folder which contains the commands.json
file
build(Plugin plugin)
Initialize the API with the previously configured options
Example
SmartCommandsAPI api = new SmartCommandsAPI.ApiBuilder().build(this);
Last updated