Make "help command better

This commit is contained in:
7cc5c4f330d47060 2024-07-23 15:15:15 -04:00
parent e5fdff4724
commit 0acd785a5c
2 changed files with 16 additions and 1 deletions

View file

@ -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:()=>{

View file

@ -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",