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

@@ -28,6 +28,8 @@ import client.command.Command;
import client.command.CommandContext;
import constants.id.NpcId;
import java.util.Map;
public class HelpCommand extends Command {
{
setDescription("Show available commands.");
@@ -35,6 +37,7 @@ public class HelpCommand extends Command {
@Override
public void execute(Client client, String[] params, CommandContext ctx) {
client.getAbstractPlayerInteraction().openNpc(NpcId.STEWARD, "commands");
Map<String, Object> bindings = Map.of("ce", ctx.commandsExecutor());
client.getAbstractPlayerInteraction().openNpc(NpcId.STEWARD, "commands", bindings);
}
}