• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

My Minecraft Launcher Is Closing When I Open The Game

ilkernumi

New Member
Joined
Apr 23, 2022
Messages
1 (0.00/day)
using CmlLib.Core;
using CmlLib.Core.Auth;
using System;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Aeron_Launcher

{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = true;
}

public int MaximumRamMb { get; private set; }
public MSession Session { get; private set; }

void gameoyunac()
{
var launchOption = new MLaunchOption()
{
Session = MSession.GetOfflineSession(label2.Text),
Path = new MinecraftPath(),
MaximumRamMb = 4096,
JavaPath = "javaw.exe",
VersionType = "CmlLauncher",
GameLauncherName = "CmlLauncher",
GameLauncherVersion = "2",

FullScreen = false,

};
}
private void guna2Button1_Click(object sender, EventArgs e)
{
if (String.IsNullOrEmpty(guna2TextBox1.Text))
{
MessageBox.Show("You cant enter the game without using name. Please Enter A user name");
}
else
{
guna2Button1.Enabled = false;
Thread thread = new Thread(() => Launch());
thread.IsBackground = true;
thread.Start();

Task.Run(gameoyunac);
}
}

private void Launch()
{
throw new NotImplementedException();
}

private void launch()
{
throw new NotImplementedException();
}
}
}
What is the wrong thing with my code.
 
Top