From a33c44544ff98aaf14e599d5b9a8003acef8df8a Mon Sep 17 00:00:00 2001 From: Vortrex <3858226+VortrexFTW@users.noreply.github.com> Date: Thu, 17 Mar 2022 08:10:17 -0500 Subject: [PATCH] Add all command array util --- scripts/server/command.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/server/command.js b/scripts/server/command.js index da6d58bd..d9e87bdc 100644 --- a/scripts/server/command.js +++ b/scripts/server/command.js @@ -772,6 +772,19 @@ function listAllCommands() { // =========================================================================== +function getAllCommandsInSingleArray() { + let tempCommands = []; + for(let i in serverCommands) { + for(let j in serverCommands[i]) { + tempCommands.push(serverCommands[i][j]); + } + } + + return tempCommands; +} + +// =========================================================================== + function doesCommandExist(command) { if(getCommandData(command)) { return true;