Implement invalid command handler, thank you to Matadoer for pointing this omission out with his plugin.
This commit is contained in:
parent
0cdafc0e81
commit
fc6278b16d
1 changed files with 4 additions and 1 deletions
|
|
@ -215,7 +215,10 @@ namespace TShockAPI
|
||||||
Command cmd = ChatCommands.FirstOrDefault(c => c.HasAlias(cmdName));
|
Command cmd = ChatCommands.FirstOrDefault(c => c.HasAlias(cmdName));
|
||||||
|
|
||||||
if (cmd == null)
|
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))
|
if (!cmd.CanRun(player))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue