public static void Chat(Character Character, string Message) { foreach (string Key in ChatCommands.Keys) { if (Message.StartsWith(Key)) { try { ChatCommands[Key].Execute(Character, Message); } catch (Exception ex) { ServerConsole.WriteLine("Chat command error: {0}", MessageLevel.Error, ex); } } } Character.Chat(Message); }
public void Execute(Character Character, string Message) { Character.Chat(Message); }