PHPackages                             jasonw4331/libpmquery - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. jasonw4331/libpmquery

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

jasonw4331/libpmquery
=====================

A library for querying Minecraft Bedrock servers

1.0.0(2y ago)4219413[2 issues](https://github.com/jasonw4331/libpmquery/issues)[2 PRs](https://github.com/jasonw4331/libpmquery/pulls)1lgpl-3.0-or-laterPHPPHP ^7.4|^8.0

Since Apr 22Pushed 1y ago2 watchersCompare

[ Source](https://github.com/jasonw4331/libpmquery)[ Packagist](https://packagist.org/packages/jasonw4331/libpmquery)[ Fund](https://www.buymeacoffee.com/jasonwynn10)[ GitHub Sponsors](https://github.com/[user1)[ RSS](/packages/jasonw4331-libpmquery/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (4)Used By (1)

libPMQuery
==========

[](#libpmquery)

[![Poggit-Ci](https://camo.githubusercontent.com/88f69e1cb3b11fb002461c395ce680380c4eb81f8e590eef0dc7be06759b7c0d/68747470733a2f2f706f676769742e706d6d702e696f2f63692e736869656c642f6a61736f6e77343333312f6c6962706d71756572792f6c6962706d7175657279)](https://poggit.pmmp.io/ci/jasonw4331/libpmquery/libpmquery)

A PocketMine Virion which allows plugins to query other servers for a selection of information

Basic Usage
-----------

[](#basic-usage)

This virion was made for developers to query Pocketmine-MP servers with ease. Here is some basic functionality:

### Required imports

[](#required-imports)

The following imports are necessary to use the virion library:

```
use jasonw4331\libpmquery\PMQuery;
use jasonw4331\libpmquery\PmQueryException;
```

### API

[](#api)

The querying API is a single function which grabs the data from whatever server you input. Usage is as follows:

```
$query = PMQuery::query("my.server.net", 19132);
```

The values returned will follow these values/types:

```
$query['GameName'];         // Returns the server software being used
$query['HostName'];         // Returns the server host name
$query['Protocol'];         // Returns the protocol version allowed to connect
$query['Version'];          // Returns the client version allowed to connect
$query['Players'];          // Returns the number of players on the server currently
$query['MaxPlayers'];       // Returns the maximum player count of the server
$query['ServerId'];         // Returns the raknet server id
$query['Map'];              // Returns the default world name
$query['GameMode'];         // Returns the default gamemode
$query['NintendoLimited'];  // Returns the status of Nintendo's limitation to join
$query['IPv4Port'];         // Returns the ipv4 port number
$query['IPv6Port'];         // Returns the ipv6 port number
$query['Extra'];            // I still don't know what this info is
```

### Offline Queries

[](#offline-queries)

Queries sent to offline servers always throw a `PmQueryException`. Exceptions can be caught in a try/catch statement to log their offline status.

```
try{
    $query = PMQuery::query("my.server.net", 19133);
    $players = (int) $query['Players'];
    Server::getInstance()->getLogger()->info("There are ".$players." on the queried server right now!");
}catch(PmQueryException $e){
    //you can choose to log this if you want
    Server::getInstance()->getLogger()->info("The queried server is offline right now!");
}
```

###  Health Score

33

—

LowBetter than 75% of packages

Maintenance27

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

754d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/18d53d426125946a94e8eccf831dc59ec13e3c347f8090d48c968b48c3bd44bb?d=identicon)[jasonw\_4331](/maintainers/jasonw_4331)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (92 commits)")[![jasonw4331](https://avatars.githubusercontent.com/u/16521025?v=4)](https://github.com/jasonw4331 "jasonw4331 (29 commits)")[![JavierLeon9966](https://avatars.githubusercontent.com/u/58715544?v=4)](https://github.com/JavierLeon9966 "JavierLeon9966 (2 commits)")[![mmm545](https://avatars.githubusercontent.com/u/64874108?v=4)](https://github.com/mmm545 "mmm545 (1 commits)")[![packbier](https://avatars.githubusercontent.com/u/22497985?v=4)](https://github.com/packbier "packbier (1 commits)")[![poggit-bot](https://avatars.githubusercontent.com/u/22427965?v=4)](https://github.com/poggit-bot "poggit-bot (1 commits)")

---

Tags

phppocketminepocketmine-mppoggit-virion

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jasonw4331-libpmquery/health.svg)

```
[![Health](https://phpackages.com/badges/jasonw4331-libpmquery/health.svg)](https://phpackages.com/packages/jasonw4331-libpmquery)
```

###  Alternatives

[madeyourday/contao-rocksolid-custom-elements

Create your own, nestable content elements using a modular system. End the WYSIWYG chaos with your own content elements.

50341.9k12](/packages/madeyourday-contao-rocksolid-custom-elements)[yireo/magento2-replace-bundled

Replace bundled third party packages from Magento

45335.0k1](/packages/yireo-magento2-replace-bundled)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
