{"id":15018703,"url":"https://github.com/jarne/querylibrary","last_synced_at":"2025-10-23T20:31:47.818Z","repository":{"id":56996643,"uuid":"113581527","full_name":"jarne/QueryLibrary","owner":"jarne","description":"🗄 A library to fetch the query information of Minecraft: Bedrock Edition servers","archived":false,"fork":false,"pushed_at":"2022-07-22T14:12:06.000Z","size":47,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T21:04:09.240Z","etag":null,"topics":["library","minecraft","player","pocketmine-mp","query"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/jarne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-08T14:13:29.000Z","updated_at":"2022-07-22T14:12:09.000Z","dependencies_parsed_at":"2022-08-21T10:51:01.589Z","dependency_job_id":null,"html_url":"https://github.com/jarne/QueryLibrary","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FQueryLibrary","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FQueryLibrary/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FQueryLibrary/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jarne%2FQueryLibrary/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jarne","download_url":"https://codeload.github.com/jarne/QueryLibrary/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237882172,"owners_count":19381176,"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","player","pocketmine-mp","query"],"created_at":"2024-09-24T19:52:18.291Z","updated_at":"2025-10-23T20:31:42.502Z","avatar_url":"https://github.com/jarne.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eQueryLibrary\u003c/h1\u003e\n\u003cp align=\"center\"\u003eA library to fetch the query information of Minecraft: Bedrock Edition servers\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://packagist.org/packages/jarne/querylibrary\"\u003e\n        \u003cimg src=\"https://img.shields.io/packagist/v/jarne/querylibrary.svg\" alt=\"Packagist version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://php.net\"\u003e\n        \u003cimg src=\"https://img.shields.io/packagist/php-v/jarne/querylibrary.svg\" alt=\"PHP version\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://circleci.com/gh/jarne/QueryLibrary\"\u003e\n    \u003cimg src=\"https://img.shields.io/circleci/project/github/jarne/QueryLibrary.svg\" alt=\"CircleCI\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/jarne/QueryLibrary/blob/master/LICENSE\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/license/jarne/QueryLibrary.svg\" alt=\"License\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n##\n\n[• Install](#-install)  \n[• Usage](#-usage)  \n[• Examples](#%EF%B8%8F-examples)  \n[• Contribution](#-contribution)  \n[• License](#%EF%B8%8F-license)\n\n## 📦 Install\nThis library requires PHP 7.2 or newer in order to work correctly. You can install it with:\n\n```\n$ composer require jarne/querylibrary\n```\n\nIf you don't like Composer, you can also clone the repository with:\n\n```\n$ git clone https://github.com/jarne/QueryLibrary\n```\n\n## 👨‍💻 Usage\nThere is only one function called `fetch` to get the query information of a server. You must enter the IP of the server. If you don't specify the port or the timeout, it'll use the default port 19132 and a timeout of 5 seconds. The data is returned in a `Result`-object which has functions to get each value.\n\n```php\n/**\n * Fetch query information of a server\n *\n * @param string $ip\n * @param int $port\n * @param int $timeoutSeconds\n *\n * @return Result\n */\npublic function fetch(\n    string $ip,\n    int $port = 19132,\n    int $timeoutSeconds = 5\n): Result\n```\n\nFor a list of all available get-value-functions, take a look into the [Result.php](https://github.com/jarne/QueryLibrary/blob/master/src/jarne/querylibrary/utils/Result.php) file.\n\n## ⌨️ Examples\nAs an example, we're going to fetch the default level name of a PocketMine-MP server running on the local machine.\n\n```php\n$queryLibrary = new QueryLibrary();\n$result = $queryLibrary-\u003efetch(\"127.0.0.1\");\n\necho \"The default level name is \" . $result-\u003egetDefaultLevelName();\n```\n\n## 🙋‍ Contribution\nContributions are always very welcome! It's completely equal if you're a beginner or a more experienced developer.\n\nPlease read our **[Contribution Guidelines](CONTRIBUTING.md)** before creating an issue or submitting a pull request.\n\nThanks for your interest 🎉👍!\n\n## 👨‍⚖️ License\n[MIT](https://github.com/jarne/QueryLibrary/blob/master/LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarne%2Fquerylibrary","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjarne%2Fquerylibrary","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjarne%2Fquerylibrary/lists"}