public void HandleConsoleCommand(string msg) { CommandSender sender = new ConsoleSender(); ServerCommandEventArgs serverCommandEvent = new ServerCommandEventArgs(sender, msg); ServerEvents.OnServerCommand(serverCommandEvent); if (serverCommandEvent.IsCancel) { return; } string[] args = serverCommandEvent.Message.Split(' '); string cmd = args[0]; if (args.Length != 1) { List <string> tmp = new List <string>(args); tmp.RemoveAt(0); args = tmp.ToArray(); } else { args = new string[0]; } this.CommandHandler.CommandHandle(sender, cmd, args); }