Skip to content

Latest commit

 

History

History
40 lines (34 loc) · 1.03 KB

File metadata and controls

40 lines (34 loc) · 1.03 KB

MC-QueryServer

A light weight query server for custom minecraft servers

USAGE

QueryServer query = new QueryServer(
    //theses anonimous function can be any function with a prototype of BaseServerInfo function() and BaseServerInfo FullServerInfo()
    () => new QueryServer.BasicServerInfo { 
    MOTD = "A Query Server !", 
    GameType = "Testing", 
    MapName = "None", 
    NumPlayers = "42", 
    MaxPlayers = "69", 
    HostPort = 19132, 
    HostIp = "127.0.0.1" },
    
    () => new QueryServer.FullServerInfo { 
    MOTD = "A Query Server !", 
    GameType = "Testing", 
    GameID = "MINECRAFT", 
    Plugins = "", 
    Players = new string[] { "Nicolas61x", "dadodasyra", "Zelytra" }, 
    Version = "1.18.0", 
    MapName = "None", 
    NumPlayers = "42", 
    MaxPlayers = "69", 
    HostPort = 19132, 
    HostIp = "127.0.0.1" },
    
    //port to listen to
    19132
    );

//run the query server for 60s
Thread.Sleep(60000);

//stop the server (it can be restarted with StartListening)
query.StopListening();