Example of use
This is an example of what you can do using SmartCommands.
Initialize the API
SmartCommandsAPI api = new SmartCommandsAPI.ApiBuilder().build(this);Create your command
{
"item": {
"description": "A command to customize your items.",
"usage": "/item",
"resource": "commands/command_item.json",
"resourceOnly": false,
"aliases": ["it"],
"issuers": ["PLAYER"],
"tabComplete": true
}
}Add contents to your command
"commandUsage": {
"name": {
"component": {
"text": "&6/item name &e[name] &7to rename your item.",
"showText": "&bClick to suggest",
"suggestCommand": "item name",
"color": "GRAY"
},
"permission": "item.name",
"type": "Usage.class"
},
"clear": {
"component": {
"text": "&6/item clear &7to remove all the attributes of your team.",
"showText": "&bClick to execute",
"runCommand": "item clear",
"color": "GRAY"
},
"permission": "item.clear",
"type": "Usage.class"
},
"lore": {
"list": {
"component": {
"text": "&6/item lore list &7to show the lore your the item.",
"showText": "&bClick to execute",
"runCommand": "item lore list",
"color": "GRAY"
},
"permission": "item.lore.list",
"type": "Usage.class"
},
"add": {
"component": {
"text": "&6/item lore add &e[line] &7to add a line to your item lore.",
"showText": "&bClick to suggest",
"suggestCommand": "item lore add",
"color": "GRAY"
},
"permission": "lore.add",
"type": "Usage.class"
},
"remove": {
"component": {
"text": "&6/item lore remove &e[line] &7to remove a line to your item lore.",
"showText": "&bClick to suggest",
"suggestCommand": "item lore remove",
"color": "GRAY"
},
"permission": "lore.remove",
"type": "Usage.class"
}
}
}Register your command
Results
Advanced command aid system




Automatic tab completer

Last updated