Example #1
0
 /// <summary>
 ///     Set the gamemode for a given player
 /// </summary>
 /// <param name="mode">The gamemode to set</param>
 /// <param name="player">The player</param>
 public static void SetGameMode(MinecraftGameMode mode, string player)
 {
     if (ProcessHandler.ProcessHandler.IsRunning)
     {
         ProcessHandler.ProcessHandler.SendInput("gamemode " + (int)mode + " " + player);
         return;
     }
     MetroMessageBox.Show(Application.OpenForms[0],
                          "The server has to be running to perform this operation!", "Server not running", MessageBoxButtons.OK,
                          MessageBoxIcon.Error);
 }
Example #2
0
 /// <summary>
 ///     Set the gamemode for a given player
 /// </summary>
 /// <param name="mode">The gamemode to set</param>
 /// <param name="player">The player</param>
 public static void SetGameMode(MinecraftGameMode mode, string player)
 {
     if (ProcessHandler.ProcessHandler.IsRunning)
     {
         ProcessHandler.ProcessHandler.SendInput("gamemode " + (int) mode + " " + player);
         return;
     }
     MetroMessageBox.Show(Application.OpenForms[0],
         "The server has to be running to perform this operation!", "Server not running", MessageBoxButtons.OK,
         MessageBoxIcon.Error);
 }
Example #3
0
		/// <summary>
		///     Set the gamemode for a given player
		/// </summary>
		/// <param name="mode">The gamemode to set</param>
		public void SetGameMode(MinecraftGameMode mode)
		{
			PlayerActions.SetGameMode(mode, Name);
		}
Example #4
0
 /// <summary>
 ///     Set the gamemode for a given player
 /// </summary>
 /// <param name="mode">The gamemode to set</param>
 public void SetGameMode(MinecraftGameMode mode)
 {
     PlayerActions.SetGameMode(mode, Name);
 }