I write new launcher for mine Minecraft roleplay server in Microsoft Forms App using CmlLib.Core and when I start the game it shows me "multiplayer is disabled" how can I fix this?
Library: https://github.com/CmlLib/CmlLib.Core
Source Code:
using CmlLib.Core;
using CmlLib.Core.Auth;
using System.Threading;
namespace Toba_Launcher
{
public partial class Toba : Form
{
public Toba()
{
InitializeComponent();
Control.CheckForIllegalCrossThreadCalls = false;
}
private void path()
{
var path = new MinecraftPath();
var launcher = new CMLauncher(path);
launcher.FileChanged += (e) =>
{
console.Items.Add(string.Format("[{0}] {1} - {2}/{3}", e.FileKind.ToString(), e.FileName, e.ProgressedFileCount, e.TotalFileCount));
};
launcher.ProgressChanged += (s, e) =>
{
//Console.WriteLine("{0}%", e.ProgressPercentage);
};
}
private async void launch()
{
var path = new MinecraftPath();
var launcher = new CMLauncher(path);
launcher.FileChanged += (e) =>
{
console.Items.Add(string.Format("[{0}] {1} - {2}/{3}", e.FileKind.ToString(), e.FileName, e.ProgressedFileCount, e.TotalFileCount));
};
var launchOption = new MLaunchOption
{
MaximumRamMb = 1024,
Session = MSession.GetOfflineSession("Test123")
//ServerIp = "mc.hypixel.net"
};
var process = launcher.CreateProcess("1.16.5", launchOption);
process.Start();
Hide();
}
private void Toba_Load(object sender, EventArgs e)
{
path();
}
private void button1_Click(object sender, EventArgs e)
{
button1.Enabled = false;
Thread thread = new Thread(() => launch());
thread.IsBackground = true;
thread.Start();
}
}
}
I read documentation but not find anything useful.
I tried this:
MSession session = new MSession("username", "accesstoken", "uuid");
But nothing changed, maybe I can't use it.