Click or drag to resize
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.ModLoader
Assembly: SpaarModLoader (in SpaarModLoader.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
C#
public 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: Boolean
True if registration succeeded, false otherwise
See Also