summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Command.cs
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-11-19 13:48:19 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2018-11-19 13:48:19 -0500
commit593723b7940ba72a786fc4c7366c56f9813d977b (patch)
tree4d23fbef5bc5a20115f10ca04ae3379df78cc8e1 /src/SMAPI/Framework/Command.cs
parent4f28ea33bd7cc65485402c5e85259083e86b49e1 (diff)
parent3dc27a5681dcfc4ae30e95570d9966f2e14a4dd7 (diff)
downloadSMAPI-593723b7940ba72a786fc4c7366c56f9813d977b.tar.gz
SMAPI-593723b7940ba72a786fc4c7366c56f9813d977b.tar.bz2
SMAPI-593723b7940ba72a786fc4c7366c56f9813d977b.zip
Merge branch 'develop' into stable
Diffstat (limited to 'src/SMAPI/Framework/Command.cs')
-rw-r--r--src/SMAPI/Framework/Command.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/SMAPI/Framework/Command.cs b/src/SMAPI/Framework/Command.cs
index 943e018d..8c9df47d 100644
--- a/src/SMAPI/Framework/Command.cs
+++ b/src/SMAPI/Framework/Command.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
namespace StardewModdingAPI.Framework
{
@@ -8,8 +8,8 @@ namespace StardewModdingAPI.Framework
/*********
** Accessor
*********/
- /// <summary>The friendly name for the mod that registered the command.</summary>
- public string ModName { get; }
+ /// <summary>The mod that registered the command (or <c>null</c> if registered by SMAPI).</summary>
+ public IModMetadata Mod { get; }
/// <summary>The command name, which the user must type to trigger it.</summary>
public string Name { get; }
@@ -25,13 +25,13 @@ namespace StardewModdingAPI.Framework
** Public methods
*********/
/// <summary>Construct an instance.</summary>
- /// <param name="modName">The friendly name for the mod that registered the command.</param>
+ /// <param name="mod">The mod that registered the command (or <c>null</c> if registered by SMAPI).</param>
/// <param name="name">The command name, which the user must type to trigger it.</param>
/// <param name="documentation">The human-readable documentation shown when the player runs the built-in 'help' command.</param>
/// <param name="callback">The method to invoke when the command is triggered. This method is passed the command name and arguments submitted by the user.</param>
- public Command(string modName, string name, string documentation, Action<string, string[]> callback)
+ public Command(IModMetadata mod, string name, string documentation, Action<string, string[]> callback)
{
- this.ModName = modName;
+ this.Mod = mod;
this.Name = name;
this.Documentation = documentation;
this.Callback = callback;