From fc6278b16db61e51dae5a98c3652b647a9a72814 Mon Sep 17 00:00:00 2001 From: Zidonuke Date: Thu, 22 Dec 2011 01:57:03 -0500 Subject: [PATCH] Implement invalid command handler, thank you to Matadoer for pointing this omission out with his plugin. --- TShockAPI/Commands.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/TShockAPI/Commands.cs b/TShockAPI/Commands.cs index 5703cdc1..fb3f2eba 100644 --- a/TShockAPI/Commands.cs +++ b/TShockAPI/Commands.cs @@ -215,7 +215,10 @@ namespace TShockAPI Command cmd = ChatCommands.FirstOrDefault(c => c.HasAlias(cmdName)); if (cmd == null) - return false; + { + player.SendMessage("Invalid Command Entered. Type /help for a list of valid Commands.", Color.Red); + return true; + } if (!cmd.CanRun(player)) {