Fix HelpCommand not working without static CommandsExecutor

This commit is contained in:
P0nk
2023-03-31 07:57:31 +02:00
parent 699da37f06
commit 785f74ed21
7 changed files with 33 additions and 13 deletions

View File

@@ -14,9 +14,9 @@ var staff_heading = "!";
var levels = ["Common", "Donator", "JrGM", "GM", "SuperGM", "Developer", "Admin"];
var commands;
// Expectation: "ce" bound to an instance of java.client.command.CommandsExecutor
function writeHeavenMSCommands() {
const CommandsExecutor = Java.type('client.command.CommandsExecutor');
commands = CommandsExecutor.getInstance().getGmCommands(); // TODO: fix. CommandsExecutor is now injected rather than being a singleton, so this does not work anymore.
commands = ce.getGmCommands();
}
function start() {