public void HookChatCommand(string command, ChatCommandHookCall call, bool priority = false) { if (!ChatCommandHooks.ContainsKey(command)) ChatCommandHooks.Add(command, new List<ChatCommandHookCall>()); if (priority) ChatCommandHooks[command].Insert(0, call); else ChatCommandHooks[command].Add(call); }
public void HookChatCommand(string command, ChatCommandHookCall call, bool priority = false) { if (!ChatCommandHooks.ContainsKey(command)) { ChatCommandHooks.Add(command, new List <ChatCommandHookCall>()); } if (priority) { ChatCommandHooks[command].Insert(0, call); } else { ChatCommandHooks[command].Add(call); } }