/// <summary> /// Adds the specified number of users to the simulator. /// Throws an Assert if count doesn't increment by expected number. /// </summary> /// <param name="n">Number of users to add.</param> private void AddUser(int n) { Console.Write(string.Format("Adding {0} user(s)...", n)); for (int i = 0; i < n; i++) { int startingUsers = mPersistentServer.Users.Count; mPersistentServer.Execute("!useradd"); WaitForUserCount(startingUsers + 1); } Console.WriteLine(string.Format("done ({0} online)", mPersistentServer.Users.Count)); }
private void ExecuteTask(ScheduleTask task) { task.CalculateNextRunTime(); if (mServer != null) { mServer.RaiseServerMessage(string.Format("Running scheduled task '{0}'. Next run will be {1}.", task.Name, task.NextRun)); mServer.Execute(task.Command); } }
private void SendServerCommand(string command) { AddMessageToLog(command); mMinecraft.Execute(command); }