示例#1
0
 /// <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));
 }
示例#2
0
 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);
     }
 }
示例#3
0
 private void SendServerCommand(string command)
 {
     AddMessageToLog(command);
     mMinecraft.Execute(command);
 }