using System; namespace StardewModdingAPI { /// Provides an API for managing console commands. public interface ICommandHelper : IModLinked { /********* ** Public methods *********/ /// Add a console command. /// The command name, which the user must type to trigger it. /// The human-readable documentation shown when the player runs the built-in 'help' command. /// The method to invoke when the command is triggered. This method is passed the command name and arguments submitted by the user. /// The or is null or empty. /// The is not a valid format. /// There's already a command with that name. ICommandHelper Add(string name, string documentation, Action callback); /// Trigger a command. /// The command name. /// The command arguments. /// Returns whether a matching command was triggered. bool Trigger(string name, string[] arguments); } }