{"id":15374628,"url":"https://github.com/ading2210/mcutils","last_synced_at":"2025-08-19T21:20:30.473Z","repository":{"id":115505244,"uuid":"469047374","full_name":"ading2210/mcutils","owner":"ading2210","description":"A collection of utilities for interacting with Minecraft servers.","archived":false,"fork":false,"pushed_at":"2022-03-13T00:29:51.000Z","size":44,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T06:28:54.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ading2210.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-03-12T10:15:35.000Z","updated_at":"2022-11-27T19:31:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec72c0b1-3c8d-4f37-a1ba-4a681b8e739f","html_url":"https://github.com/ading2210/mcutils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fmcutils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fmcutils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fmcutils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ading2210%2Fmcutils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ading2210","download_url":"https://codeload.github.com/ading2210/mcutils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244095046,"owners_count":20397148,"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":[],"created_at":"2024-10-01T13:59:12.597Z","updated_at":"2025-08-19T21:20:30.460Z","avatar_url":"https://github.com/ading2210.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mcutils\nA collection of utilities for interacting with Minecraft servers.\n\n## Documentation\n### extractor.py\nA tool to extract the client jar file.\n```python\nfrom utils import extractor\n\n#extract the client jar file\nprint(\"Downloading and extracting the client...\")\nextractor_obj = extractor.Extractor(\"1.16.5\")\nextracted_path = extractor_obj.extract_jar()\nprint(\"Client extracted to:\", extracted_path)\n\n#get a list of death messages\ndeath_messages = extractor_obj.get_death_messages()\n```\n### rcon.py\nInterface with the Minecraft RCON protocol. \n```python\nfrom utils import rcon\n\n#send a command to the local server\n\nrcon = rcon.RCON(\"127.0.0.1\", 25575, \"password\")\n\n#returns a string with the command's output\noutput = rcon.send_cmd(\"list\")\nprint(output)\n\nrcon.close()\n```\n\n### query.py\nInterface with the Minecraft query protocol.\n```python\nfrom utils import query\n\n#query the local server\n\nquery_obj = query.Query((\"127.0.0.1\", 25565))\n\n#retuns a dict with some stats\nfull_stat = query_obj.full_stat()\nbasic_stat = query_obj.basic_stat()\n\nprint(full_stat)\n```\n\n### ping.py\nPing any Minecraft server above version 1.7.\n```python\nfrom utils import ping\n\n#ping the local server\n\npinger = ping.Pinger((\"127.0.0.1\", 25565))\n\n#retuns a dict with some stats\nstats = pinger.ping()\n\nprint(stats)\n```\n\n### motd_renderer.py\nGenerate a nearly pixel-perfect image of what a server would look line in the client's server list.\nYou need to have Pillow installed for this to work (`pip3 install Pillow`).\n```python\nfrom utils import motd_renderer\n\n#renders an image of the server's motd and icon\n\nrenderer = motd_renderer.MOTDRenderer()\n\n#returns a PIL image object\nimage = renderer.get_full_image(title=\"Hypixel\", address=(\"mc.hypixel.net\", 25565))\nimage.save(\"/tmp/img.png\", \"PNG\")\n\n```\nGenerated image:\n\n![example of a generated image](https://raw.githubusercontent.com/ading2210/mcutils/main/images/motd.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fading2210%2Fmcutils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fading2210%2Fmcutils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fading2210%2Fmcutils/lists"}