Skip to content

A C# library for querying/pinging Minecraft servers.

License

Notifications You must be signed in to change notification settings

SergeantSerk/MCQuery

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCQuery FOSSA Status Codacy Badge Build status

Description

A C# library for querying/pinging Minecraft servers.

Sample Usage

See sample code below for basic usage.

using MCQuery;
using System;

namespace Sample
{
    public class Program
    {
        private static string address = "mc.hypixel.net";
        private static int port = 25565;

        public static void Main(string[] args)
        {
            MCServer server = new MCServer(address, port);
            ServerStatus status = server.Status();
            double ping = server.Ping();
            Console.WriteLine($"Server: {server.Address}:{server.Port}");
            Console.WriteLine($"Ping:   {ping}ms");
            Console.WriteLine($"Status: {status.Players.Online}");
        }
    }
}

Installation

Recommended way of installing is through NuGet where packages are updated alongside master branch.

For the latest features (bleeding-edge), clone this repository and open the MCQuery/MCQuery.sln solution in Visual Studio. Build using the Release configuration and use the MCQuery/bin/Release/netstandard2.0/MCQuery.dll file in your project.

Alternatively, you can download the DLL (not always up-to-date) from the Release page.

License

FOSSA Status

About

A C# library for querying/pinging Minecraft servers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages