[This is preliminary documentation and is subject to change.]
Registers a custom command with fCraft, to be made available for players to call.
Raises CommandManager.CommandRegistering/CommandRegistered events.
CommandRegistering event may silently cancel the registration.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.3.5 (0.6.3.5)
Syntax
| C# |
public static void RegisterCustomCommand( CommandDescriptor descriptor )
Parameters
- descriptor
- CommandDescriptor
Command descriptor to register.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | descriptor is null. |
| fCraft..::..CommandRegistrationException | Command descriptor could not be registered. Check exception message for details. Possible reasons include: No category/name/handler was set; a command with the same name has already been registed; command name is reserved; or one of the aliases of given command matches the name of another registered command. |