/// <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); }
/// <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); }
/// <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); }