{"id":18751099,"url":"https://github.com/sch8ill/mcclient-lib","last_synced_at":"2025-04-13T00:08:39.390Z","repository":{"id":147444805,"uuid":"552472140","full_name":"Sch8ill/mcclient-lib","owner":"Sch8ill","description":"A lightweight Minecraft client for querying the status data of a Minecraft server","archived":false,"fork":false,"pushed_at":"2024-08-30T23:25:56.000Z","size":165,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-13T00:08:26.935Z","etag":null,"topics":["client","libary","minecraft","minecraft-ping","minecraft-query","minecraft-server","minecraft-server-pinger","minecraft-slp","pip","python","python3","tcp","tcp-client"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Sch8ill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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}},"created_at":"2022-10-16T17:11:58.000Z","updated_at":"2025-03-30T20:24:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"7c09f736-dbf0-42f3-8c0b-fcc7856425a4","html_url":"https://github.com/Sch8ill/mcclient-lib","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sch8ill%2Fmcclient-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sch8ill%2Fmcclient-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sch8ill%2Fmcclient-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sch8ill%2Fmcclient-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sch8ill","download_url":"https://codeload.github.com/Sch8ill/mcclient-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248647299,"owners_count":21139086,"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":["client","libary","minecraft","minecraft-ping","minecraft-query","minecraft-server","minecraft-server-pinger","minecraft-slp","pip","python","python3","tcp","tcp-client"],"created_at":"2024-11-07T17:14:29.526Z","updated_at":"2025-04-13T00:08:39.361Z","avatar_url":"https://github.com/Sch8ill.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcclient-lib\n\n[![Downloads](https://static.pepy.tech/badge/mcclient-lib)](https://pepy.tech/project/mcclient-lib)\n[![PyPI](https://img.shields.io/pypi/v/mcclient-lib?color=green\u0026label=PyPI%20package)](https://pypi.org/project/mcclient-lib/)\n\nA lightweight Minecraft client for querying the status data of a Minecraft server.\n\n## Supported Minecraft versions\n\n* Minecraft Java (v1.4.0 and later)\n* Minecraft Bedrock\n\n## Supported protocols\n\n* [Server List Ping](https://wiki.vg/Server_List_Ping) for Minecraft Java servers\n* [Legacy Server List Ping](https://wiki.vg/Server_List_Ping#1.4_to_1.5) for Minecraft Java servers before 1.4\n* [Query Protocol](https://wiki.vg/Query) for Minecraft Java servers (needs to be enabled on the server)\n* [Bedrock Server List Ping](https://wiki.vg/Raknet_Protocol#Unconnected_Ping) for Minecraft Bedrock servers\n\n## Installation\n\n```bash\npip install mcclient-lib\n```\n\n## Usage\n\n### Server List Ping\n\n```python\nfrom mcclient import SLPClient\n\n# for Minecraft Java servers from version 1.7 and later\nslp_client = SLPClient(\"mc.example.com\")\nres = slp_client.get_status()\n ```\n\n### Query\n\n```python\nfrom mcclient import QueryClient\n\n# for Minecraft Java servers (needs to be enabled on the server)\nquery_client = QueryClient(\"mc.example.com\")\nres = query_client.get_status()\n```\n\n### Bedrock Server List Ping\n\n```python\nfrom mcclient import BedrockSLPClient\n\n# for Minecraft Bedrock servers\nbedrock_slp_client = BedrockSLPClient(\"mc.example.com\")\nres = bedrock_slp_client.get_status()\n```\n\n### Response\n\n```python\nprint(f\"motd: {res.motd}\")\n\nprint(f\"online players: {res.players.online}\")\nprint(f\"max players: {res.players.max}\")\nprint(f\"players list: {res.players.list}\")\n\nprint(f\"version: {res.version.name}\")\nprint(f\"protocol version: {res.version.protocol}\")\n\nprint(f\"host: {res.host}\")\nprint(f\"port: {res.port}\")\nprint(f\"timestamp: {res.timestamp}\")\nprint(f\"favicon: {res.favicon is not None}\")\n\n# only for query and Bedrock responses\nprint(f\"gametype: {res.gametype}\")\nprint(f\"map: {res.map}\")\n\n# only for query responses\nprint(f\"plugins: {res.plugins}\")\nprint(f\"host ip: {res.hostip}\")\nprint(f\"host port: {res.hostport}\")\n\n# only for bedrock responses\nprint(f\"server id: {res.server_id}\")\n```\n\nNote that not every field is queryable with every protocol.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsch8ill%2Fmcclient-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsch8ill%2Fmcclient-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsch8ill%2Fmcclient-lib/lists"}