#Options in Custom Commands

1 messages · Page 1 of 1 (latest)

wild bear
#

Does anyone know how I can add option hints in commands? Like this vanilla command
this is my code

system.beforeEvents.startup.subscribe((init) => {
  const bloodStormCommand = {
    name: "one:bloodstorm",
    description: "command",
    permissionLevel: CommandPermissionLevel.Any,
    optionalParameters: [
      {name: "action", type: CustomCommandParamType.String}, /// reset // add // remove // set
      {name: "value", type: CustomCommandParamType.Integer},
    ]
  };
  init.customCommandRegistry.registerCommand(bloodStormCommand, origin);
});
#

I wanted to add a tabular option

strong ore
#

I believe this is probably done using an enum.

shadow tree
#

You need to create a custom enum for that