Skip to content

.Net Core 5.0 library which implements Minecraft Query protocol. You can use it for getting statuses of servers

License

Notifications You must be signed in to change notification settings

MaxLevs/McQuery.Net

Repository files navigation

McQueryLib.Net

Library for .Net which implements Minecraft Query protocol. You can use it for getting statuses of a Minecraft server.

Example of using

static async Task DoSomething(IEnumerable<IPEndPoint> mcServersEndPoints)
{
	McQueryService service = new(5, 5000, 500, 1000); 

	List<Server> servers = mcServersEndPoints.Select(service.RegistrateServer).ToList();

	List<Task<IResponse>> requests = new();
	foreach (Server server in servers)
	{
		requests.Add(service.GetBasicStatusCommon(server));
		requests.Add(service.GetFullStatusCommon(server));
	}

	Task.WaitAll(requests.ToArray());

	foreach (Task<IResponse> request in requests)
	{
		IResponse response = await request;
		Console.WriteLine(response.ToString() + "\n");
	}
}

About

.Net Core 5.0 library which implements Minecraft Query protocol. You can use it for getting statuses of servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages