diff options
Diffstat (limited to 'src/StardewModdingAPI/Framework/CommandManager.cs')
-rw-r--r-- | src/StardewModdingAPI/Framework/CommandManager.cs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/StardewModdingAPI/Framework/CommandManager.cs b/src/StardewModdingAPI/Framework/CommandManager.cs index 9af3d27a..79a23d03 100644 --- a/src/StardewModdingAPI/Framework/CommandManager.cs +++ b/src/StardewModdingAPI/Framework/CommandManager.cs @@ -52,8 +52,7 @@ namespace StardewModdingAPI.Framework public Command Get(string name) { name = this.GetNormalisedName(name); - Command command; - this.Commands.TryGetValue(name, out command); + this.Commands.TryGetValue(name, out Command command); return command; } @@ -92,8 +91,7 @@ namespace StardewModdingAPI.Framework return false; // get command - Command command; - if (this.Commands.TryGetValue(name, out command)) + if (this.Commands.TryGetValue(name, out Command command)) { command.Callback.Invoke(name, arguments); return true; @@ -101,6 +99,7 @@ namespace StardewModdingAPI.Framework return false; } + /********* ** Private methods *********/ @@ -114,4 +113,4 @@ namespace StardewModdingAPI.Framework : null; } } -}
\ No newline at end of file +} |