/// <summary> /// Full constructor, recommended. /// </summary> public CommandEntry(string _commandline, List<CommandEntry> _block, CommandEntry _owner, AbstractCommand _command, List<string> _arguments, string _name, int _marker) { CommandLine = _commandline; Block = _block; BlockOwner = _owner; Command = _command; Arguments = _arguments; Name = _name; Marker = _marker; }
/// <summary> /// Adds a command to the registered command list. /// </summary> /// <param name="command">The command to register.</param> public void RegisterCommand(AbstractCommand command) { command.Name = command.Name.ToLower(); // Just a quick backup in case somebody messed up. command.CommandSystem = this; RegisteredCommands.Add(command.Name, command); RegisteredCommandList.Add(command); }