Make "help command better
This commit is contained in:
parent
e5fdff4724
commit
0acd785a5c
2 changed files with 16 additions and 1 deletions
|
@ -61,7 +61,15 @@ module.exports={
|
|||
if(cmds[cmd].desc){
|
||||
desc=cmds[cmd].desc;
|
||||
}
|
||||
b.tellraw(uuid,{"text":getMessage(lang,"command.help.commandInfo",[cmd,usage,desc])});
|
||||
//b.tellraw(uuid,{"text":getMessage(lang,"command.help.commandInfo",[cmd,usage,desc])});
|
||||
b.tellraw(uuid,{"text":getMessage(lang,"command.help.commandUsage",[cmd,usage,desc])});
|
||||
b.tellraw(uuid,{"text":getMessage(lang,"command.help.commandDesc",[desc])});
|
||||
const permsN=getMessage(lang,"command.help.permsNormal");
|
||||
const permsT=getMessage(lang,"command.help.permsTrusted");
|
||||
const permsO=getMessage(lang,"command.help.permsOwner");
|
||||
const permsC=getMessage(lang,"command.help.permsConsole");
|
||||
const rPerms=cmds[cmd].level?cmds[cmd].level:0;
|
||||
b.tellraw(uuid,{"text":getMessage(lang,"command.help.commandPerms",[[permsN,permsT,permsO,permsC][rPerms]])});
|
||||
}
|
||||
},
|
||||
loadCMD:()=>{
|
||||
|
|
|
@ -28,6 +28,13 @@
|
|||
"command.about.serverinfo": "To view system information, run the command \"serverinfo\".",
|
||||
"command.help.cmdList": "Commands: %s",
|
||||
"command.help.commandInfo": "%s%s - %s",
|
||||
"command.help.commandUsage": "Usage - %s%s",
|
||||
"command.help.commandDesc": "Description - %s",
|
||||
"command.help.commandPerms": "Required permissions - %s",
|
||||
"command.help.permsNormal": "Normal",
|
||||
"command.help.permsTrusted": "Trusted",
|
||||
"command.help.permsOwner": "Owner",
|
||||
"command.help.permsConsole": "Console",
|
||||
"command.serverinfo.os.android": "Android",
|
||||
"command.serverinfo.os.freebsd": "FreeBSD",
|
||||
"command.serverinfo.os.linux": "Linux",
|
||||
|
|
Loading…
Reference in a new issue