public static bool Register(string name, Command.CommandExecutedCallback callback) { if (!commands.Exists(t => t.Name == name)) { commands.Add(new Command(name, callback)); } else { return(false); } return(true); }
/// <summary> /// Registers a chat command to the CommandProcessor. /// </summary> /// <param name="name">The command to register.</param> /// <returns>Whether the registration of the command was successful or not.</returns> public bool RegisterCommand(string name, Command.CommandExecutedCallback callback) { return(CommandProcessor.Register(name, callback)); }