{"id":20256815,"url":"https://github.com/owen3h/mojang-lib","last_synced_at":"2025-04-11T00:22:35.260Z","repository":{"id":176547893,"uuid":"657214328","full_name":"Owen3H/mojang-lib","owner":"Owen3H","description":"A modern wrapper for interacting with the Mojang API.","archived":false,"fork":false,"pushed_at":"2025-03-11T16:20:27.000Z","size":1212,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-03T11:04:14.856Z","etag":null,"topics":["library","minecraft","mojang","node","wrapper"],"latest_commit_sha":null,"homepage":"https://npmjs.com/package/mojang-lib","language":"TypeScript","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/Owen3H.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["Owen3H"]}},"created_at":"2023-06-22T15:05:21.000Z","updated_at":"2025-03-11T16:20:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1941f9f-9015-46ad-8cd5-906dcf8f4d42","html_url":"https://github.com/Owen3H/mojang-lib","commit_stats":null,"previous_names":["owen3h/mojang-lib"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owen3H%2Fmojang-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owen3H%2Fmojang-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owen3H%2Fmojang-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Owen3H%2Fmojang-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Owen3H","download_url":"https://codeload.github.com/Owen3H/mojang-lib/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248318940,"owners_count":21083752,"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":["library","minecraft","mojang","node","wrapper"],"created_at":"2024-11-14T10:48:27.838Z","updated_at":"2025-04-11T00:22:35.240Z","avatar_url":"https://github.com/Owen3H.png","language":"TypeScript","funding_links":["https://github.com/sponsors/Owen3H"],"categories":[],"sub_categories":[],"readme":"# mojang-lib ![GitHub repo size](https://img.shields.io/github/repo-size/Owen3H/mojang-lib) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/mojang-lib?label=minzip)\n\nA modern wrapper for interacting with the Mojang API.\u003cbr\u003e\u003cp\u003e\nThis library is a rewritten version of [minecraft-lib](https://github.com/Emrio/minecraft-js) in TypeScript.\u003cbr\u003e\nThe list of changes made are available [here](/CHANGES.md).\n\n[Read the docs](https://owen3h.github.io/mojang-lib)\n\n## Install\n[Bun](https://bun.sh) - `bun add mojang-lib`\\\n[PNPM](https://pnpm.io/installation#using-npm) - `pnpm add mojang-lib`\n\n## Usage\n\n### ESM\n```js\nimport { players, servers } from \"mojang-lib\"\n\nconst server = await servers.get('play.earthmc.net')\nconsole.log(server)\n\nconst player = await players.get('Owen3H')\nconsole.log(player)\n```\n\n### CommonJS\n```js\nconst MCAPI = require(\"mojang-lib\")\n\nasync function runTest() {\n  const server = await MCAPI.servers.get('play.earthmc.net')\n  console.log(server)\n\n  const player = await MCAPI.players.get('Owen3H')\n  console.log(player)\n}\n\nrunTest()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowen3h%2Fmojang-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fowen3h%2Fmojang-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fowen3h%2Fmojang-lib/lists"}