From 5cc069476e1cb63c8fef2dd245a540b6b5130e68 Mon Sep 17 00:00:00 2001 From: Jesse Plamondon-Willard Date: Sat, 26 Dec 2020 11:20:47 -0500 Subject: deprecate ConsoleCommands.Trigger method --- src/SMAPI/Framework/ModHelpers/CommandHelper.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/SMAPI/Framework/ModHelpers') diff --git a/src/SMAPI/Framework/ModHelpers/CommandHelper.cs b/src/SMAPI/Framework/ModHelpers/CommandHelper.cs index 600f867f..69382009 100644 --- a/src/SMAPI/Framework/ModHelpers/CommandHelper.cs +++ b/src/SMAPI/Framework/ModHelpers/CommandHelper.cs @@ -36,8 +36,16 @@ namespace StardewModdingAPI.Framework.ModHelpers } /// + [Obsolete] public bool Trigger(string name, string[] arguments) { + SCore.DeprecationManager.Warn( + source: SCore.DeprecationManager.GetSourceName(this.ModID), + nounPhrase: $"{nameof(IModHelper)}.{nameof(IModHelper.ConsoleCommands)}.{nameof(ICommandHelper.Trigger)}", + version: "3.8.1", + severity: DeprecationLevel.Notice + ); + return this.CommandManager.Trigger(name, arguments); } } -- cgit