{"id":16379742,"url":"https://github.com/owencochell/mctools","last_synced_at":"2025-03-21T01:32:34.183Z","repository":{"id":47510610,"uuid":"277887153","full_name":"OwenCochell/mctools","owner":"OwenCochell","description":"Minecraft Connection Tools - Python implementations of common Minecraft protocols.","archived":false,"fork":false,"pushed_at":"2023-05-04T22:09:04.000Z","size":543,"stargazers_count":44,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"master","last_synced_at":"2023-11-20T15:12:57.254Z","etag":null,"topics":["minecraft","minecraft-server-list-ping","query","rcon"],"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/OwenCochell.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}},"created_at":"2020-07-07T17:58:50.000Z","updated_at":"2023-09-02T12:23:45.000Z","dependencies_parsed_at":"2022-07-22T13:32:37.808Z","dependency_job_id":"7f1c4b20-9006-408e-a5a7-7bade4d25e2c","html_url":"https://github.com/OwenCochell/mctools","commit_stats":{"total_commits":23,"total_committers":2,"mean_commits":11.5,"dds":0.04347826086956519,"last_synced_commit":"7567b14c46f86ab4fa618808bc66d70c64c2a7df"},"previous_names":["owencochell/mctools","owen-cochell/mctools"],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fmctools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fmctools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fmctools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OwenCochell%2Fmctools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OwenCochell","download_url":"https://codeload.github.com/OwenCochell/mctools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244721549,"owners_count":20498974,"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":["minecraft","minecraft-server-list-ping","query","rcon"],"created_at":"2024-10-11T03:49:36.055Z","updated_at":"2025-03-21T01:32:33.776Z","avatar_url":"https://github.com/OwenCochell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Minecraft Connection Tools\nA python implementation for interacting with Minecraft servers.\n\n[![Documentation Status](https://readthedocs.org/projects/mctools/badge/?version=latest)](https://mctools.readthedocs.io/en/latest/?badge=latest)\n\n# Introduction\n\nmctools allows you to interact with Minecraft servers via [rcon](https://wiki.vg/RCON), \n[query](https://wiki.vg/Query), and [server list ping protocol](https://wiki.vg/Server_List_Ping).\n\nThis allows you to do the following:\n\n- Send and receive Minecraft server commands\n- Get player count(max and currently playing)\n- Get server version\n- Get the message of the day\n- Get currently installed plugins\n- And much more!\n\nAll of this can be achieved using simple, intuitive calls to mctools. mctools does all the heavy lifting for you!\nAlso, mctools has no external dependencies(Unless you are a windows user and need color support),\nand only uses the python standard library. Just download and go!\n\n# Example\n\nSend a command to the Minecraft server via rcon:\n\n```python\nfrom mctools import RCONClient  # Import the RCONClient\n\nHOST = 'mc.server.net'  # Hostname of the Minecraft server\nPORT = 1234  # Port number of the RCON server\n\n# Create the RCONClient:\n\nrcon = RCONClient(HOST, port=PORT)\n\n# Login to RCON:\n\nif rcon.login(\"password\"):\n\n   # Send command to RCON - broadcast message to all players:\n\n   resp = rcon.command(\"broadcast Hello RCON!\")\n```\n\n# Installation \n\nYou can install mctools via pip:\n\n```bash\n$ pip install mctools\n```\n\nIf you are a windows user and want color support, then install mctools like so:\n\n```bash\n$ pip install mctools[color]\n```\n\nFor more information on installing mctools, check out the instillation section in our \n[documentation](https://mctools.readthedocs.io/en/latest/install.html).\n\n# Formatting\n\nmctools has support for handling Minecraft formatting codes. \nYou can decide weather mctools replaces formatting characters with intended values, removes them, or leaves them be.\n\nFor example, lets say you received the following content during a rcon session:\n\n```\n§e--------- §fHelp: Index (1/40) §e--------------------\n§7Use /help [n] to get page n of help.\n§6Aliases: §fLists command aliases\n§6Bukkit: §fAll commands for Bukkit\n§6ClearLag: §fAll commands for ClearLag\n§6Essentials: §fAll commands for Essentials\n§6LuckPerms: §fAll commands for LuckPerms\n§6Minecraft: §fAll commands for Minecraft\n§6Vault: §fAll commands for Vault\n§6WorldEdit: §fAll commands for WorldEdit\n```\n\nAs you can see, this text is somewhat hard to read. If you told mctools to remove the formatting characters,\nthen the output will look like this:\n\n```\n--------- Help: Index (1/40) --------------------\nUse /help [n] to get page n of help.\nAliases: Lists command aliases\nBukkit: All commands for Bukkit\nClearLag: All commands for ClearLag\nEssentials: All commands for Essentials\nLuckPerms: All commands for LuckPerms\nMinecraft: All commands for Minecraft\nVault: All commands for Vault\nWorldEdit: All commands for WorldEdit\n```\n\nMuch easier to read and process. mctools handles this operation automatically, so you don't have to.\nmctools also handles situations where content is sent in ChatObject notation, and can extract messages from the\nplayer sample list.\n\nTo learn more about formatters, and how to create your own,\nthen please check out the [formatting documentation](https://mctools.readthedocs.io/en/latest/format.html).\n\n# MCLI - mctools Command Line Interface\n\nmctools is shipped with a CLI front end called mcli, which you can use to start rcon sessions, get stats\nvia query/ping, check if a Minecraft server is up, ect.\n\nAfter installing mctools(through pip or setuptools), you can invoke mcli like so:\n\n```bash\n$ mcli --help\n```\n\nYou can also run mcli.py(which is located in the parent directory) if you downloaded the source code and did not\ninstall via pip/setuptools.\n\nThe above command will generate the help menu for mcli. To learn more about mcli, please check out the \n[mcli documentation](https://mctools.readthedocs.io/en/latest/mcli.html).\n\nWe supply mcli as an executable built using pyinstaller under releases\nfor windows systems that don't have python installed.\nThe exe file provided may be buggy or have some weird quirks,\nso it is recommended to invoke mcli via python.\n\n# Documentation\n\nmctools has an extensive documentation. It contains tutorials, the API reference, and best practice recommendations.\nYou can find the [documentation here](https://mctools.readthedocs.io/).\n\nBe sure to also check out the [mctools PyPi page](https://pypi.org/project/mctools/) for more information.\n\n# Bug Reports\n\nIf you encounter a bug or any other event that does not seem normal,\nthen please open an issue, or email me personally.\nI will be sure to get back to you as soon as possible.\n\nYour feedback and reports are appreciated!\nYour comments and issues are an excellent way to correct issues with mctools.\n\n# Contributing\n\nPull requests are welcome and encouraged :) ! If you want to see a feature in mctools, or have found a bug,\na PR will be the quickest way to get your change implemented. \nFeel free to email me or open an issue if you have any problems.\n\nIf you are interested in helping in the development of mctools, then send me an email, and we can get talking!\nBelieve me, there is plenty of work that needs to be done. More help would be greatly appreciated!\n\n# Conclusion\n\nmctools offers a pythonic, reliable way to interact with Minecraft servers, without being too complicated.\nPlease check the documentation for more information. More features (hopefully) coming soon!\n\nThank you for reading!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowencochell%2Fmctools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowencochell%2Fmctools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowencochell%2Fmctools/lists"}