namespace StardewModdingAPI { /// The implementation for a Stardew Valley mod. public interface IMod { /********* ** Accessors *********/ /// Provides simplified APIs for writing mods. IModHelper Helper { get; } /// Writes messages to the console and log file. IMonitor Monitor { get; } /// The mod's manifest. IManifest ModManifest { get; } /********* ** Public methods *********/ /// The mod entry point, called after the mod is first loaded. /// Provides simplified APIs for writing mods. void Entry(IModHelper helper); /// Get an API that other mods can access. This is always called after , and is only called once even if multiple mods access it. /// You can implement to provide one instance to all mods, or to provide a separate instance per mod. These are mutually exclusive, so you can only implement one of them. /// Returns the API instance, or null if the mod has no API. object? GetApi(); /// Get an API that other mods can access. This is always called after , and is called once per mod that accesses the API (even if they access it multiple times). /// The mod accessing the API. /// Returns the API instance, or null if the mod has no API. Note that is provided for informational purposes only, and that denying API access to specific mods is strongly discouraged and may be considered abusive. /// object? GetApi(IModInfo mod); } }