{"id":14969672,"url":"https://github.com/dreamscached/minequery","last_synced_at":"2025-10-26T09:30:54.616Z","repository":{"id":45165429,"uuid":"439623480","full_name":"dreamscached/MineQuery","owner":"dreamscached","description":"📡 Minecraft Server List Ping library written in Go","archived":false,"fork":false,"pushed_at":"2024-06-03T08:16:44.000Z","size":427,"stargazers_count":28,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"v2","last_synced_at":"2025-01-31T17:40:48.541Z","etag":null,"topics":["bukkit","craftbukkit","go","golang","mcping","minecraft","paper","ping","query","server-list-ping","spigot"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/dreamscached/minequery/v2","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dreamscached.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.txt","dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"dreamscached","liberapay":"dreamscached"}},"created_at":"2021-12-18T13:34:04.000Z","updated_at":"2025-01-14T05:42:55.000Z","dependencies_parsed_at":"2024-05-17T14:26:59.565Z","dependency_job_id":"1bab8106-ca26-4300-be1e-b08f420dfe01","html_url":"https://github.com/dreamscached/MineQuery","commit_stats":null,"previous_names":["alteamc/minequery","altea-minecraft/minequery"],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamscached%2FMineQuery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamscached%2FMineQuery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamscached%2FMineQuery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dreamscached%2FMineQuery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dreamscached","download_url":"https://codeload.github.com/dreamscached/MineQuery/tar.gz/refs/heads/v2","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238301212,"owners_count":19449403,"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":["bukkit","craftbukkit","go","golang","mcping","minecraft","paper","ping","query","server-list-ping","spigot"],"created_at":"2024-09-24T13:42:12.068Z","updated_at":"2025-10-26T09:30:54.604Z","avatar_url":"https://github.com/dreamscached.png","language":"Go","funding_links":["https://ko-fi.com/dreamscached","https://liberapay.com/dreamscached"],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e📡 MineQuery\u003c/h1\u003e\n\u003ch4 align=\"center\"\u003eMinecraft Server List Ping library written in Go\u003c/h4\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dreamscached/minequery/blob/v2/go.mod\"\u003e\n        \u003cimg alt=\"Go version badge\" src=\"https://img.shields.io/github/go-mod/go-version/dreamscached/minequery\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/dreamscached/minequery/releases/latest\"\u003e\n        \u003cimg alt=\"Latest release badge\" src=\"https://img.shields.io/github/v/release/dreamscached/minequery\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pkg.go.dev/github.com/dreamscached/minequery/v2\"\u003e\n        \u003cimg alt=\"Go reference badge\" src=\"https://pkg.go.dev/badge/github.com/dreamscached/minequery.svg\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/dreamscached/minequery/blob/v2/LICENSE\"\u003e\n        \u003cimg alt=\"License badge\" src=\"https://img.shields.io/github/license/dreamscached/minequery\"\u003e\n    \u003c/a\u003e\n    \u003cbr/\u003e\n    \u003ca href=\"https://github.com/dreamscached/minequery#readme\"\u003e\n        \u003cimg alt=\"Minecraft version support badge\" src=\"https://img.shields.io/badge/minecraft%20version-Beta%201.8%20to%201.3%20%7C%201.4%20to%201.5%20%7C%201.6%20%7C%201.7%2B-brightgreen\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n\u003e [!WARNING]\n\u003e **MineQuery is no longer maintained.** \u003cbr\u003e\n\u003e It used to be my small personal project for my own personal needs that I decided to share with\n\u003e the rest of the world, and honestly, it might be not exactly be a great tool to work with for developing something \n\u003e serious. I'm not planning on getting back to it at the moment, and if I do, it is likely going to be a complete \n\u003e rebuilt-from-scratch overhaul. Thank you for using MineQuery in the meantime. \u003cbr\u003e\n\u003e \u0026mdash; dreamscached\n\n# 🚀 Migrating from v2 or v1\n\nIf you're new to MineQuery, you can skip this part. If you have used it before, you\nmight want to give it a read if you're planning to switch from v1, or want to know\nabout breaking changes in v2.x.x version and how to adapt your codebase.\n\nSee [MIGRATING.md][1] for help with migrating from MineQuery.\n\n## ✨ Features\n\n### ⛏ Minecraft Version Support\n\nMineQuery supports pinging of all versions of Minecraft.\n\n| [Beta 1.8 to 1.3][2] | [1.4 to 1.5][3] | [1.6][4]    | [1.7+][5]   |\n|----------------------|-----------------|-------------|-------------|\n| ✅ Supported          | ✅ Supported     | ✅ Supported | ✅ Supported |\n\n### 📡 Query Protocol Support\n\nMineQuery v2.1.0+ fully supports [Query][9] protocol.\n\n### 🏷 SRV Record Support\n\nMineQuery v2.5.0+ fully supports SRV records.\n\n## 📚 How to use\n\n### Basic usage\n\nFor simple pinging with default parameters, use package-global `Ping*` functions\n(where `*` is your respective Minecraft server version.)\n\nIf you're unsure about version, it is known that Notchian servers respond to\nall previous version pings (e.g. 1.7+ server will respond to 1.6 ping, and so on.)\n\nHere's a quick example how to:\n\n#### Pinging (1.7+ servers)\n\n```go\nimport \"github.com/dreamscached/minequery/v2\"\n\nres, err := minequery.Ping17(\"localhost\", 25565)\nif err != nil { panic(err) }\nfmt.Println(res)\n```\n\n#### Querying\n\n```go\nimport \"github.com/dreamscached/minequery/v2\"\n\nres, err := minequery.QueryBasic(\"localhost\", 25565)\n// ... or ...\nres, err := minequery.QueryFull(\"localhost\", 25565)\nif err != nil { panic(err) }\nfmt.Println(res)\n```\n\nFor full info on response object structure, see [documentation][7].\n\n### Advanced usage\n\n#### Pinger\n\nFor more advanced usage, such as setting custom timeout or enabling more strict\nresponse validation, you can use `Pinger` struct with `PingerOption` passed to it:\n\n```go\nimport \"github.com/dreamscached/minequery/v2\"\n\npinger := minequery.NewPinger(\nminequery.WithTimeout(5 * time.Second),\nminequery.WithUseStrict(true),\nminequery.WithProtocolVersion16(minequery.Ping16ProtocolVersion162),\nminequery.WithProtocolVersion17(minequery.Ping17ProtocolVersion172),\n)\n```\n\nThen, use `Ping*` functions on it the same way as described in [Basic usage][8] section:\n\n```go\nimport \"github.com/dreamscached/minequery/v2\"\n\n// Ping Beta 1.8+\npinger.PingBeta18(\"localhost\", 25565)\n// Ping 1.4+\npinger.Ping14(\"localhost\", 25565)\n// Ping 1.6+\npinger.Ping16(\"localhost\", 25565)\n// Ping 1.7+\npinger.Ping17(\"localhost\", 25565)\n```\n\nOr `Query*`:\n\n```go\nimport \"github.com/dreamscached/minequery/v2\"\n\n// Query basic stats\nres, err := pinger.QueryBasic(\"localhost\", 25565)\n// Query full stats\nres, err := pinger.QueryFull(\"localhost\", 25565)\n```\n\n#### WithTimeout\n\nBy default, `Pinger` has 15-second timeout before connection aborts. If you need\nto customize this duration, you can use `WithTimeout` option.\n\n#### WithUseStrict\n\nBy default, `Pinger` does not validate response data it receives and silently\nomits erroneous values it processes (incorrect favicon or bad player UUID).\nIf you need it to return an error in case of invalid response, you can use\n`WithUseStrict` option.\n\n#### WithQueryCacheExpiry\n\nBy default, `Pinger` stores query sessions in cache for 30 seconds and flushes expired\nentries every 5 minutes. If you want to override these defaults, use `WithQueryCacheExpiry`\noption.\n\n#### WithQueryCacheDisabled\n\nBy default, `Pinger` stores query sessions in cache, reusing sessions and security tokens\nand saving bandwidth. If you don't want to use session cache, use `WithQueryCacheDisabled`\noption.\n\n#### WithQueryCache\n\nBy default, `Pinger` stores query sessions using `patrickmn/go-cache` library\n(and `WithQueryCacheExpiry`/`WithQueryCacheDisabled` only affect this implementation of\ncache for Go). If you wish to use other cache implementation, you can use any that\nimplements `Cache` interface.\n\n#### WithProtocolVersion16\n\nBy default, `Pinger` sends protocol version 74 in 1.6 ping packets. If you need\nto customize protocol version sent, use `WithProtocolVersion16`. MineQuery provides\na convenient set of constants you can use \u0026mdash; see `Ping16ProtocolVersion*` constants.\n\n#### WithProtocolVersion17\n\nBy default, `Pinger` sends protocol version -1 in 1.7 ping packets. If you need\nto customize protocol version sent, use `WithProtocolVersion17`. MineQuery provides\na convenient set of constants you can use \u0026mdash; see `Ping17ProtocolVersion*` constants.\n\n#### WithUnmarshaller\n\nBy default, `Pinger` uses standard Go `json.Unmarshal` function to unmarshal JSON which can\nbe slow compared to alternatives. If you need to use another unmarshaller library, you can\nuse this option to provide an `Unmarshaller` implementation that will be used instead.\n\n#### WithImageDecoder\n\nBy default, `Pinger` uses standard Go `png.Decode` function to decode PNG from binary stream.\nIf you need to use another decoding library, you can use this option to provide\n`png.Decode`-compatible function that will be used instead.\n\n#### WithImageEncoding\n\nBy default, `Pinger` uses standard Go `base64.StdEncoding` encoding to decode Base64 string\nreturned in 1.7+ responses. If you need to use another encoding, you can use this option to\nprovide a compatible implementation that will be used instead.\n\n[1]: MIGRATING.md\n\n[2]: https://wiki.vg/Server_List_Ping#Beta_1.8_to_1.3\n\n[3]: https://wiki.vg/Server_List_Ping#1.4_to_1.5\n\n[4]: https://wiki.vg/Server_List_Ping#1.6\n\n[5]: https://wiki.vg/Server_List_Ping#Current\n\n[6]: https://github.com/dreamscached/minequery/issues/25\n\n[7]: https://pkg.go.dev/github.com/dreamscached/minequery/v2\n\n[8]: #basic-usage\n\n[9]: https://wiki.vg/Query\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamscached%2Fminequery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdreamscached%2Fminequery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdreamscached%2Fminequery/lists"}