Add list of commands that are eligible to be run to the Playercommand hook, so that a plugin may override this.
Add an event for TShock Chat, pushing out the raw text and the text tshock sends, allowing for plugins to run after tshock and change what tshock is sending.
This commit is contained in:
parent
0872283039
commit
99de841f5d
3 changed files with 36 additions and 11 deletions
|
|
@ -567,11 +567,11 @@ namespace TShockAPI
|
|||
string cmdName = args[0].ToLower();
|
||||
args.RemoveAt(0);
|
||||
|
||||
if (Hooks.PlayerHooks.OnPlayerCommand(player, cmdName, cmdText, args))
|
||||
return true;
|
||||
|
||||
IEnumerable<Command> cmds = ChatCommands.Where(c => c.HasAlias(cmdName));
|
||||
|
||||
if (Hooks.PlayerHooks.OnPlayerCommand(player, cmdName, cmdText, args, ref cmds))
|
||||
return true;
|
||||
|
||||
if (cmds.Count() == 0)
|
||||
{
|
||||
if (player.AwaitingResponse.ContainsKey(cmdName))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue