{"id":15555831,"url":"https://github.com/breqdev/mcstatus","last_synced_at":"2025-04-23T20:07:38.905Z","repository":{"id":115365527,"uuid":"287822344","full_name":"breqdev/mcstatus","owner":"breqdev","description":null,"archived":false,"fork":false,"pushed_at":"2022-09-03T19:52:21.000Z","size":35,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-23T20:07:24.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/breqdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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},"funding":{"github":"breqdev","ko_fi":"breqdev"}},"created_at":"2020-08-15T20:45:54.000Z","updated_at":"2025-03-09T19:14:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"f9ac5e0c-502e-43d8-a685-e6e1938aea59","html_url":"https://github.com/breqdev/mcstatus","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/breqdev%2Fmcstatus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breqdev%2Fmcstatus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breqdev%2Fmcstatus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/breqdev%2Fmcstatus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/breqdev","download_url":"https://codeload.github.com/breqdev/mcstatus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250506140,"owners_count":21441723,"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-02T15:10:46.643Z","updated_at":"2025-04-23T20:07:38.899Z","avatar_url":"https://github.com/breqdev.png","language":"JavaScript","readme":"# McStatus\n\n**Live demo at [breq.dev/apps/mcstatus.html](https://breq.dev/apps/mcstatus.html)!**\n\nA JavaScript library to embed a Minecraft server status readout.\n\nInclude the library:\n\n```\n\u003cscript type=\"text/javascript\" src=\"https://github.breq.dev/mcstatus/mcstatus.js\"\u003e\u003c/script\u003e\n```\n\nThen, in your document, create elements for embeds with:\n\n```\n\u003cdiv class=\"mc-status\" data-mc-server=\"[server IP]\"\u003e\u003c/div\u003e\n```\n\n### Code structure\n\n`mcstatus.js` loads a stylesheet into `\u003chead\u003e` to style the embeds. It then loads a div complete with Minecraft server information into the DOM wherever it finds a `\u003cdiv class=\"mc-status\"\u003e`, using the `data-mc-server` attr to set the server IP.\n\nThe status protocol for Minecraft servers uses raw TCP sockets, so a pure-JS server query-er isn't possible. There are a lot of existing Minecraft server status tools, like [mcsrvstat.us](https://api.mcsrvstat.us/), but they don't have a CORS header set, so they couldn't be used from JavaScript. So, I implemented my own at `https://mcstatus.breq.dev/` with the bare minimum API for this project to work. If you want to run your own relay, `pip3 install -r requirements.txt` and run the `relay.py` file.\n\nI'm using Dinnerbone's awesome [Server Pinger](https://github.com/Dinnerbone/mcstatus) under the hood on the relay.\n\nTo change the style of the embed, just add a stylesheet that overrides the styles at [mcstatus.css](https://github.com/breqdev/mcstatus/blob/master/mcstatus.css).\n","funding_links":["https://github.com/sponsors/breqdev","https://ko-fi.com/breqdev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreqdev%2Fmcstatus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbreqdev%2Fmcstatus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbreqdev%2Fmcstatus/lists"}