{"id":15016325,"url":"https://github.com/fragland/minestat","last_synced_at":"2025-05-14T18:02:29.208Z","repository":{"id":16185066,"uuid":"18931626","full_name":"FragLand/minestat","owner":"FragLand","description":":chart_with_upwards_trend: A Minecraft server status checker","archived":false,"fork":false,"pushed_at":"2025-04-27T00:39:53.000Z","size":1062,"stargazers_count":360,"open_issues_count":11,"forks_count":73,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-08T02:41:41.024Z","etag":null,"topics":["checker","csharp","go","golang","java","javascript","js","minecraft","minecraft-server","network-monitoring","packet","perl","php","poll","powershell","protocol","python","query","ruby","status"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FragLand.png","metadata":{"files":{"readme":".github/README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-04-19T02:36:13.000Z","updated_at":"2025-04-28T22:36:00.000Z","dependencies_parsed_at":"2023-10-01T22:11:11.316Z","dependency_job_id":"cd8c3a6e-555b-4d08-b286-4e2290d7ccff","html_url":"https://github.com/FragLand/minestat","commit_stats":{"total_commits":683,"total_committers":25,"mean_commits":27.32,"dds":0.4260614934114202,"last_synced_commit":"1c5a5df77f54550625c97c2739f08490f0fb7afb"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FragLand%2Fminestat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FragLand%2Fminestat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FragLand%2Fminestat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FragLand%2Fminestat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FragLand","download_url":"https://codeload.github.com/FragLand/minestat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254198453,"owners_count":22030964,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checker","csharp","go","golang","java","javascript","js","minecraft","minecraft-server","network-monitoring","packet","perl","php","poll","powershell","protocol","python","query","ruby","status"],"created_at":"2024-09-24T19:48:42.223Z","updated_at":"2025-05-14T18:02:29.054Z","avatar_url":"https://github.com/FragLand.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"MineStat :chart_with_upwards_trend:\n========\n\n[![AppVeyor build status](https://img.shields.io/appveyor/ci/ldilley/minestat?label=AppVeyor%20build%20status)](https://ci.appveyor.com/project/ldilley/minestat)\n[![CodeQL build status](https://github.com/FragLand/minestat/actions/workflows/CodeQL.yml/badge.svg?branch=master)](https://github.com/FragLand/minestat/actions/workflows/CodeQL.yml)\n[![CodeFactor grade](https://img.shields.io/codefactor/grade/github/FragLand/minestat?label=CodeFactor%20quality)](https://www.codefactor.io/repository/github/fragland/minestat)\n[![Matrix](https://img.shields.io/matrix/fragland%3Amatrix.org?label=Matrix)](https://matrix.frag.land/)\n\nMineStat is a Minecraft server status checker.\n\nYou can use these classes/modules in a monitoring script to poll multiple Minecraft servers, include similar functionality in a Discord bot, or to let\nvisitors see the status of your server from their browser. MineStat has been ported to multiple languages for use with ASP.NET, FastCGI, mod_perl, mod_php, mod_python, Node.js, Rails, Tomcat, and more.\n\nIf you are planning to host MineStat on a shared webhost, make sure that the provider allows outbound sockets.\n\n## Protocol Support :telephone_receiver:\n**Note:** The Go, JavaScript, and Perl implementations are currently under development.\n\n|Protocol|C#|Go|Java|JavaScript|Perl|PHP|PowerShell|Python|Ruby|\n|-|--|--|----|----------|----|---|------|----|--|\n|**1.8b/1.3 (beta)**|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|\n|**1.4/1.5 (legacy)**|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|\n|**1.6 (extended legacy)**|:heavy_check_mark:|:x:|:heavy_check_mark:|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|\n|**\u003e=1.7 (JSON)**|:heavy_check_mark:|:x:|:heavy_check_mark:|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|\n|**Bedrock/PE/RakNet**|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|\n|**UT3/GS4 Query**|:x:|:x:|:x:|:x:|:x:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|:heavy_check_mark:|\n\n## Examples :memo:\n\n### C# example\n\n[![Nuget](https://img.shields.io/nuget/v/minestat?label=NuGet%20package\u0026style=plastic)](https://www.nuget.org/packages/MineStat/)\n\n```cs\nusing System;\nusing MineStatLib;\n\nclass Example\n{\n  public static void Main()\n  {\n    MineStat ms = new MineStat(\"minecraft.frag.land\", 25565);\n    Console.WriteLine(\"Minecraft server status of {0} on port {1}:\", ms.Address, ms.Port);\n    if(ms.ServerUp)\n    {\n      Console.WriteLine(\"Server is online running version {0} with {1} out of {2} players.\", ms.Version, ms.CurrentPlayers, ms.MaximumPlayers);\n      if(ms.Gamemode != null)\n        Console.WriteLine(\"Game mode: {0}\", ms.Gamemode);\n      Console.WriteLine(\"Message of the day: {0}\", ms.Stripped_Motd);\n      Console.WriteLine(\"Latency: {0}ms\", ms.Latency);\n      Console.WriteLine(\"Connected using protocol: {0}\", ms.Protocol);\n    }\n    else\n      Console.WriteLine(\"Server is offline!\");\n  }\n}\n```\n\n### Go example\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/FragLand/minestat/Go/minestat.svg)](https://pkg.go.dev/github.com/FragLand/minestat/Go/minestat)\n\nTo use the Go package: `go get github.com/FragLand/minestat/Go/minestat`\n\n```go\npackage main\n\nimport \"fmt\"\nimport \"github.com/FragLand/minestat/Go/minestat\"\n\nfunc main() {\n  minestat.Init(\"minecraft.frag.land\")\n  fmt.Printf(\"Minecraft server status of %s on port %d:\\n\", minestat.Address, minestat.Port)\n  if minestat.Online {\n    fmt.Printf(\"Server is online running version %s with %d out of %d players.\\n\", minestat.Version, minestat.Current_players, minestat.Max_players)\n    fmt.Printf(\"Message of the day: %s\\n\", minestat.Motd)\n    fmt.Printf(\"Latency: %dms\\n\", minestat.Latency)\n    fmt.Printf(\"Connected using protocol: %s\\n\", minestat.Protocol)\n  } else {\n    fmt.Println(\"Server is offline!\")\n  }\n}\n```\n\n### Java example\n\n[![Maven](https://img.shields.io/maven-central/v/io.github.fragland/MineStat?label=Maven%20package\u0026style=plastic)](https://search.maven.org/search?q=a:MineStat)\n\n```java\nimport land.Frag.MineStat;\n\nclass Example\n{\n  public static void main(String[] args)\n  {\n    MineStat ms = new MineStat(\"minecraft.frag.land\", 25565);\n    System.out.println(\"Minecraft server status of \" + ms.getAddress() + \" on port \" + ms.getPort() + \":\");\n    if(ms.isServerUp())\n    {\n     System.out.println(\"Server is online running version \" + ms.getVersion() + \" with \" + ms.getCurrentPlayers() + \" out of \" + ms.getMaximumPlayers() + \" players.\");\n     System.out.println(\"Message of the day: \" + ms.getMotd());\n     System.out.println(\"Message of the day without formatting: \" + ms.getStrippedMotd());\n     System.out.println(\"Latency: \" + ms.getLatency() + \"ms\");\n     System.out.println(\"Connected using protocol: \" + ms.getRequestType());\n    }\n    else\n      System.out.println(\"Server is offline!\");\n  }\n}\n```\n\n### JavaScript example\n\n[![npm](https://img.shields.io/npm/v/minestat?color=purple\u0026label=npm%20package\u0026style=plastic)](https://www.npmjs.com/package/minestat)\n\nTo use the npm package: `npm install minestat`\n\n```javascript\nvar ms = require('minestat');\nms.initSync({address: 'minecraft.frag.land', port: 25565}, function(error, result)\n{\n  if(error)\n  {\n    console.log('Error encountered during connection attempt.');\n    throw error;\n  }\n  console.log(\"Minecraft server status of \" + result.address + \" on port \" + result.port + \":\");\n  if(result.online)\n  {\n    console.log(\"Server is online running version \" + result.version + \" with \" + result.current_players + \" out of \" + result.max_players + \" players.\");\n    console.log(\"Message of the day: \" + result.motd);\n    console.log(\"Latency: \" + result.latency + \"ms\");\n  }\n  else\n  {\n    console.log(\"Server is offline!\");\n  }\n});\n```\n\n### Perl example\n\n[![CPAN](https://img.shields.io/cpan/v/Minecraft-ServerStatus?color=yellow\u0026label=CPAN%20module\u0026style=plastic)](https://metacpan.org/release/Minecraft-ServerStatus)\n\nTo use the CPAN module: `cpan Minecraft::ServerStatus`\n\n```perl\nuse Minecraft::ServerStatus;\n\n$ms = Minecraft::ServerStatus::init(\"minecraft.frag.land\", 25565);\n\nprint \"Minecraft server status of $ms-\u003e{address} on port $ms-\u003e{port}:\\n\";\nif($ms-\u003e{online})\n{\n  print \"Server is online running version $ms-\u003e{version} with $ms-\u003e{current_players} out of $ms-\u003e{max_players} players.\\n\";\n  print \"Message of the day: $ms-\u003e{motd}\\n\";\n  print \"Latency: $ms-\u003e{latency}ms\\n\";\n}\nelse\n{\n  print \"Server is offline!\\n\";\n}\n```\n\n### PHP example\n\n[![Packagist Version](https://img.shields.io/packagist/v/fragland/minestat?color=orange\u0026label=Packagist%20package\u0026style=plastic)](https://packagist.org/packages/fragland/minestat)\n\n**Note:** MineStat for PHP requires multi-byte string support to handle character encoding conversion. Enabling `mbstring` support can be as simple as installing the `php-mbstring` package for your platform. If building PHP from source, see https://www.php.net/manual/en/mbstring.installation.php. To validate, `phpinfo()` output will reference `mbstring` if the feature is enabled.\n\n```php\n\u003c?php\nrequire_once('minestat.php');\n\n$ms = new MineStat(\"minecraft.frag.land\", 25565);\nprintf(\"Minecraft server status of %s on port %s:\u003cbr\u003e\", $ms-\u003eget_address(), $ms-\u003eget_port());\nif($ms-\u003eis_online())\n{\n  printf(\"Server is online running version %s with %s out of %s players.\u003cbr\u003e\", $ms-\u003eget_version(), $ms-\u003eget_current_players(), $ms-\u003eget_max_players());\n  if($ms-\u003eget_request_type() == \"Bedrock/Pocket Edition\")\n    printf(\"Game mode: %s\u003cbr\u003e\", $ms-\u003eget_mode());\n  printf(\"Message of the day: %s\u003cbr\u003e\", $ms-\u003eget_motd());\n  printf(\"Message of the day without formatting: %s\u003cbr\u003e\", $ms-\u003eget_stripped_motd());\n  printf(\"Latency: %sms\u003cbr\u003e\", $ms-\u003eget_latency());\n  printf(\"Connected using protocol: %s\u003cbr\u003e\", $ms-\u003eget_request_type());\n}\nelse\n{\n  printf(\"Server is offline!\u003cbr\u003e\");\n}\n?\u003e\n```\n\n### PowerShell example\n\n[![Gallery](https://img.shields.io/powershellgallery/v/MineStat?color=blue\u0026label=PowerShell%20module\u0026style=plastic)](https://www.powershellgallery.com/packages/MineStat/)\n\nTo install the module: `Install-Module -Name MineStat`\n\n```powershell\nImport-Module MineStat\n$ms = MineStat -Address \"minecraft.frag.land\" -port 25565\n\"Minecraft server status of '{0}' on port {1}:\" -f $ms.Address, $ms.Port\n\nif ($ms.Online) {\n  \"Server is online running version {0} with {1} out of {2} players.\" -f $ms.Version, $ms.Current_Players, $ms.Max_Players\n  \"Message of the day: {0}\" -f $ms.Stripped_Motd\n  \"Latency: {0}ms\" -f $ms.Latency\n  \"Connected using SLP protocol '{0}'\" -f $ms.Slp_Protocol\n}else {\n  \"Server is offline!\"\n}\n```\n\n### Python example\n\n[![PyPI](https://img.shields.io/pypi/v/minestat?color=green\u0026label=PyPI%20package\u0026style=plastic)](https://pypi.org/project/minestat/)\n\nTo use the PyPI package: `pip install minestat`\n\n```python\nimport minestat\n\nms = minestat.MineStat('minecraft.frag.land', 25565)\nprint('Minecraft server status of %s on port %d:' % (ms.address, ms.port))\nif ms.online:\n  print('Server is online running version %s with %s out of %s players.' % (ms.version, ms.current_players, ms.max_players))\n  # Bedrock specific attribute:\n  if ms.gamemode:\n    print('Game mode: %s' % ms.gamemode)\n  print('Message of the day: %s' % ms.motd)\n  print('Message of the day without formatting: %s' % ms.stripped_motd)\n  print('Latency: %sms' % ms.latency)\n  print('Connected using protocol: %s' % ms.slp_protocol)\nelse:\n  print('Server is offline!')\n```\n\n**See [the Python specific readme \\(Python/README.md\\)](../Python/README.md) for a full list of all supported attributes.**\n\n### Ruby example\n\n[![Gem](https://img.shields.io/gem/v/minestat?color=red\u0026label=Ruby%20gem\u0026style=plastic)](https://rubygems.org/gems/minestat)\n\nTo use the gem: `gem install minestat`\n\n```ruby\nrequire 'minestat'\n\nms = MineStat.new(\"minecraft.frag.land\", 25565)\nputs \"Minecraft server status of #{ms.address} on port #{ms.port}:\"\nif ms.online\n  puts \"Server is online running version #{ms.version} with #{ms.current_players} out of #{ms.max_players} players.\"\n  puts \"Game mode: #{ms.mode}\" if ms.mode\n  puts \"Message of the day: #{ms.motd}\"\n  puts \"Message of the day without formatting: #{ms.stripped_motd}\"\n  puts \"Latency: #{ms.latency}ms\"\n  puts \"Connected using protocol: #{ms.request_type}\"\nelse\n  puts \"Server is offline!\"\nend\n```\n\n## Contributing and Support :octocat:\nFeel free to [submit an issue](https://github.com/FragLand/minestat/issues/new/choose) if you require assistance or would like to make a feature request. You are also welcome to [join us on Matrix](https://matrix.frag.land/). Any contributions such as build testing, creating bug reports or feature requests, and submitting pull requests are appreciated. Our code style guidelines can be found in the \"Coding Convention\" section of [CONTRIBUTING.md](https://github.com/FragLand/minestat/blob/master/.github/CONTRIBUTING.md). Please see the [fork and pull guide](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork) if you are not certain how to submit a pull request.\n\n## Contributors\n* [**@Ajoro**](https://github.com/ajoro): C#, PowerShell, and GitHub Actions/automation [_2020 - present_]\n* **Annukka Törmälä** ([**@nukka**](https://github.com/nukka)): Java [_2017_]\n* **Arne Sacnussem** ([**@arnesacnussem**](https://github.com/arnesacnussem)): Java [_2018_]\n* [**@BlueTree242**](https://github.com/BlueTree242): Java issue report [_2021_]\n* [**@braulio-dev**](https://github.com/braulio-dev): Feature request [_2021_]\n* [**@c0m4r**](https://github.com/c0m4r): PHP [_2020_]\n* [**@Chew**](https://github.com/Chew): Ruby issue report [_2020_]\n* [**@Conanap**](https://github.com/Conanap): JavaScript issue report [_2022_]\n* [**@DeadlineEm**](https://github.com/Deadlineem): PHP and PowerShell [_2023_]\n* **Felix Ern** ([**@MindSolve**](https://github.com/mindsolve)): C#, Java, PHP, Python, and GitHub Actions/automation [_2019 - present_]\n* [**@grimsi**](https://github.com/grimsi): Java issue report [_2020, 2021_]\n* **Hojeong Go** ([**@seia-soto**](https://github.com/seia-soto)): JavaScript [_2018_]\n* **Isaac Kogan** ([**@isaackogan**](https://github.com/isaackogan)): Feature request [_2021_]\n* [**@ItsVinnyX**](https://github.com/ItsVinnyX): Java issue report [_2018, 2020_]\n* [**@Jcodeerd**](https://github.com/Jcodeerd): Python issue report [_2021_]\n* [**@Joly0**](https://github.com/Joly0): Java issue report [_2021_]\n* [**@Jordan9232**](https://github.com/Jordan9232): Feature request [_2023_]\n* [**@jrdiver**](https://github.com/jrdiver): C# [_2022_]\n* [**@Junai22**](https://github.com/Junai22): Python issue report [_2021_]\n* **Kolya Venturi** ([**@kolyaventuri**](https://github.com/kolyaventuri)): JavaScript [_2023_]\n* [**@KyleighD**](https://github.com/kyleighd): Ideas and code review [_2014 - 2020_]\n* **Lewis L. Foster** ([**@sniff122**](https://github.com/sniff122)): Python issue report [_2018_]\n* **Lloyd Dilley** ([**@ldilley**](https://github.com/ldilley)): Lead developer [_2014 - present_]\n* **Lukas Kolletzki** ([**@kolletzki**](https://github.com/kolletzki)): C# [_2017_]\n* **Marko Pilipovicc** ([**@marko-pilipovicc**](https://github.com/marko-pilipovicc)): Java issue report [_2020_]\n* [**@matahombres**](https://github.com/matahombres): PHP issue report [_2019_]\n* [**@MegaNarwhal**](https://github.com/MegaNarwhal): Java issue report [_2017_]\n* [**@mio9**](https://github.com/mio9): JavaScript issue report [_2017_]\n* [**@molanp**](https://github.com/molanp): PHP and Python [_2023 - present_]\n* **Nate Bendall** ([**@nbendall34**](https://github.com/nbendall34)): Java issue report [_2021_]\n* [**@Nortank12**](https://github.com/Nortank12): Python issue report [_2019_]\n* [**@Norway174**](https://github.com/Norway174): JavaScript issue report [_2017_]\n* [**@Osiris-Team**](https://github.com/Osiris-Team): Java issue report [_2021_]\n* **Ozan Kurt** ([**@OzanKurt**](https://github.com/OzanKurt)): PHP issue report [_2019_]\n* **Pavel Fedin** ([**@amorphine**](https://github.com/amorphine)): Go and JavaScript issue report [_2018_]\n* **Phil Rimer**: IRC server hosting [_2014 - 2020_]\n* [**@Pronner**](https://github.com/Pronner): C# issue report [_2022_]\n* [**@Raideerke**](https://github.com/Raideerke): Go and JavaScript issue report [_2019_]\n* **Rawora Ramin** ([**@rawora-rg**](https://github.com/rawora-rg)): Java issue report [_2020_]\n* [**@RealDrPuc**](https://github.com/RealDrPuc): Python issue report [_2020_]\n* [**@rey-dev**](https://github.com/rey-dev): Feature request [_2021_]\n* [**@RunTheBot**](https://github.com/RunTheBot): JavaScript [_2023_]\n* [**@samdotnet**](https://github.com/samdotnet): Java issue report [_2020_]\n* [**@Sch8ill**](https://github.com/sch8ill): Go and Python [_2022 - present_]\n* **SeongHoon Ryu** ([**@ryush00**](https://github.com/ryush00)): Ruby [_2024_]\n* [**@sinhpn92**](https://github.com/sinhpn92): Go and JavaScript issue report [_2020_]\n* [**@skybird23333**](https://github.com/skybird23333): Java issue report [_2020_]\n* **Sondre Batalden** ([**@Pomdre**](https://github.com/Pomdre)): PHP issue report [_2019_]\n* [**@Spongecade**](https://github.com/Spongecade): Python documentation [_2023_]\n* **Stepan Melnikov** ([**@unn4m3d**](https://github.com/unn4m3d)): Ruby [_2016_]\n* **Steven Polglase** ([**@swpolgla**](https://github.com/swpolgla)): Ruby [_2021_]\n* [**@TENIOS**](https://github.com/TENIOS): Java [_2024_]\n* **ThisTNTSquid**: JavaScript [_2017_]\n* **Tony Publiski** ([**@Tonster**](https://github.com/tonster)): Minecraft and IRC server hosting [_2014 - present_]\n* **Vikas Dongre** ([**@zvikasdongre**](https://github.com/zvikasdongre)): Java issue report [_2022_]\n* **wangyw15**: C# [_2017_]\n* [**@xXBuilderBXx**](https://github.com/xXBuilderBXx): C# issue report [_2017_] \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffragland%2Fminestat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffragland%2Fminestat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffragland%2Fminestat/lists"}