2017 © Pedro Pelรกez
 

library querylibrary

A library to fetch the query information of Minecraft: Bedrock Edition servers

image

jarne/querylibrary

A library to fetch the query information of Minecraft: Bedrock Edition servers

  • Monday, April 2, 2018
  • by jarne
  • Repository
  • 1 Watchers
  • 1 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 5 % Grown

The README.md

QueryLibrary

A library to fetch the query information of Minecraft: Bedrock Edition servers, (*1)


, (*2)

Packagist version PHP version CircleCI License , (*3)

#

โ€ข Install
โ€ข Usage
โ€ข Examples
โ€ข Contribution
โ€ข License, (*4)

๐Ÿ“ฆ Install

This library requires PHP 7.2 or newer in order to work correctly. You can install it with:, (*5)

$ composer require jarne/querylibrary

If you don't like Composer, you can also clone the repository with:, (*6)

$ git clone https://github.com/jarne/QueryLibrary

๐Ÿ‘จโ€๐Ÿ’ป Usage

There 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., (*7)

/**
 * Fetch query information of a server
 *
 * @param string $ip
 * @param int $port
 * @param int $timeoutSeconds
 *
 * @return Result
 */
public function fetch(
    string $ip,
    int $port = 19132,
    int $timeoutSeconds = 5
): Result

For a list of all available get-value-functions, take a look into the Result.php file., (*8)

โŒจ๏ธ Examples

As an example, we're going to fetch the default level name of a PocketMine-MP server running on the local machine., (*9)

$queryLibrary = new QueryLibrary();
$result = $queryLibrary->fetch("127.0.0.1");

echo "The default level name is " . $result->getDefaultLevelName();

๐Ÿ™‹โ€ Contribution

Contributions are always very welcome! It's completely equal if you're a beginner or a more experienced developer., (*10)

Please read our Contribution Guidelines before creating an issue or submitting a pull request., (*11)

Thanks for your interest ๐ŸŽ‰๐Ÿ‘!, (*12)

๐Ÿ‘จโ€โš–๏ธ License

MIT, (*13)

The Versions

02/04 2018

dev-master

9999999-dev https://github.com/jarne/QueryLibrary

A library to fetch the query information of Minecraft: Bedrock Edition servers

  Sources   Download

CC-BY-SA-4.0 Creative Commons Attribution-ShareAlike 4.0 International License

The Requires

  • php >=7.2

 

The Development Requires

library query minecraft player pocketmine-mp

02/04 2018

1.1.2

1.1.2.0 https://github.com/jarne/QueryLibrary

A library to fetch the query information of Minecraft: Bedrock Edition servers

  Sources   Download

CC-BY-SA-4.0

The Requires

  • php >=7.2

 

The Development Requires

library query minecraft player pocketmine-mp

10/03 2018

1.1.1

1.1.1.0 https://github.com/jarne/QueryLibrary

A library to fetch the query information of Minecraft: Bedrock Edition servers

  Sources   Download

CC-BY-SA-4.0

The Requires

  • php >=7.2

 

The Development Requires

library query minecraft player pocketmine-mp

24/01 2018

1.1.0

1.1.0.0

A library to fetch the query information of Minecraft: Bedrock Edition servers

  Sources   Download

CC-BY-SA-4.0

The Requires

  • php >=7.2

 

The Development Requires

10/12 2017

1.0.0

1.0.0.0

A library to fetch the query information of Minecraft: Bedrock Edition servers

  Sources   Download

Creative Commons Attribution-ShareAlike 4.0 International License

The Requires

  • php >=7.0

 

The Development Requires