 | CommandsRegisterCommand Method |
Register a console command.
The passed callback will be called when the user enters the command in
the console.
If the same command was previously registered by the same mod,
the old one will be updated instead of a new one being registered.
Namespace: spaar.ModLoaderAssembly: SpaarModLoader (in SpaarModLoader.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static bool RegisterCommand(
string command,
CommandCallback callback,
string helpText = ""
)
Parameters
- command
- Type: SystemString
The command to register - callback
- Type: spaar.ModLoaderCommandCallback
The callback to be called when the command is entered - helpText (Optional)
- Type: SystemString
Help text for this command.
Used for help <mod> <command>
Return Value
Type:
BooleanTrue if registration succeeded, false otherwise
See Also