diff options
author | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 01:05:41 -0400 |
---|---|---|
committer | Jesse Plamondon-Willard <github@jplamondonw.com> | 2017-05-28 01:05:41 -0400 |
commit | 01197b0eb1845251b12322ba1b9cf130cd2a9dc1 (patch) | |
tree | 9d9cecdbebd9319c88efe848cb602ebf87dc8d9d | |
parent | 0c992e562ad1d3aafd12d0820bbd8ce0bb580c5d (diff) | |
download | SMAPI-01197b0eb1845251b12322ba1b9cf130cd2a9dc1.tar.gz SMAPI-01197b0eb1845251b12322ba1b9cf130cd2a9dc1.tar.bz2 SMAPI-01197b0eb1845251b12322ba1b9cf130cd2a9dc1.zip |
minor cleanup
-rw-r--r-- | src/StardewModdingAPI/Program.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/StardewModdingAPI/Program.cs b/src/StardewModdingAPI/Program.cs index a22e16a5..47ba7c30 100644 --- a/src/StardewModdingAPI/Program.cs +++ b/src/StardewModdingAPI/Program.cs @@ -452,10 +452,15 @@ namespace StardewModdingAPI { while (true) { + // get input string input = Console.ReadLine(); + if (string.IsNullOrWhiteSpace(input)) + continue; + + // parse input try { - if (!string.IsNullOrWhiteSpace(input) && !this.CommandManager.Trigger(input)) + if (!this.CommandManager.Trigger(input)) this.Monitor.Log("Unknown command; type 'help' for a list of available commands.", LogLevel.Error); } catch (Exception ex) |