From ac59f58ad57425898a6c991c8519825e3e76bdf8 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Fri, 29 Apr 2022 18:23:47 +0200 Subject: [PATCH 1/9] output player sample as well --- src/MinecraftServerStatus.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/MinecraftServerStatus.php b/src/MinecraftServerStatus.php index 185f6d9..1f0edec 100644 --- a/src/MinecraftServerStatus.php +++ b/src/MinecraftServerStatus.php @@ -66,6 +66,7 @@ public static function query ($host = '127.0.0.1', $port = 25565) { 'protocol' => isset($data->version->protocol) ? $data->version->protocol : false, 'players' => isset($data->players->online) ? $data->players->online : false, 'max_players' => isset($data->players->max) ? $data->players->max : false, + 'player_list' => isset($data->players->sample) ? $data->players->sample : false, 'description' => $description, 'description_raw' => $descriptionRaw, 'favicon' => isset($data->favicon) ? $data->favicon : false, From 3e0fe32ca8777ba8c80c7e795d23b6951ce1b415 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 15:47:29 +0200 Subject: [PATCH 2/9] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 98458fc..7686d57 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name" : "funnyitselmo/minecraftserverstatus", + "name" : "ok236449/minecraftserverstatus", "type" : "library", "description" : "Minecraft Server Status Query, written in PHP, with online players, motd, favicon and more server related informations without plugins and enable-query.", "keywords" : [ @@ -10,7 +10,7 @@ "license" : "BSD", "repositories" : [{ "type" : "vcs", - "url" : "https://github.com/FunnyItsElmo/PHP-Minecraft-Server-Status-Query.git" + "url" : "https://github.com/ok236449/PHP-Minecraft-Server-Status-Query.git" } ], "autoload" : { From b47d7d549fa664a2a4b39a80d38766f5e7cafc64 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 15:49:24 +0200 Subject: [PATCH 3/9] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 6b43f84..c48e29c 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +# This is just a fork! +I am not the author of this code, I am just keeping it updated for my personal use. Please have a look at the original author. + # Minecraft Server Status Query [Discontinued] [![Latest Stable Version](https://poser.pugx.org/funnyitselmo/minecraftserverstatus/v/stable)](https://packagist.org/packages/funnyitselmo/minecraftserverstatus) [![Total Downloads](https://poser.pugx.org/funnyitselmo/minecraftserverstatus/downloads)](https://packagist.org/packages/funnyitselmo/minecraftserverstatus) [![Latest Unstable Version](https://poser.pugx.org/funnyitselmo/minecraftserverstatus/v/unstable)](https://packagist.org/packages/funnyitselmo/minecraftserverstatus) [![License](https://poser.pugx.org/funnyitselmo/minecraftserverstatus/license)](https://packagist.org/packages/funnyitselmo/minecraftserverstatus) From 96513728a641169a60a010d9e83e2e5cc9580573 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 15:57:03 +0200 Subject: [PATCH 4/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7686d57..6aed43b 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "server", "status" ], - "license" : "BSD", + "license" : "proprietary", "repositories" : [{ "type" : "vcs", "url" : "https://github.com/ok236449/PHP-Minecraft-Server-Status-Query.git" From d797f514e10e99196f178d9c687035bd2a236c54 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 16:00:16 +0200 Subject: [PATCH 5/9] Update README.md --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c48e29c..cd53529 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Minecraft Server Status Query, written in PHP, with online players, motd, favico ### Installation ``` -composer require funnyitselmo/minecraftserverstatus +composer require ok236449/minecraftserverstatus ``` ### Tutorial ```Java @@ -70,6 +70,10 @@ The following table contains the available variables the response can contain. T Number of the slots of the server +
'player_list'
+Collection of connected players. It contains player´s nick and uuid. + +
'description'
The message of the day of the server From 61be4388d7505f74fc9722b5af34d6926cc4c0ea Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 16:03:45 +0200 Subject: [PATCH 6/9] Update README.md --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index cd53529..58b3070 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,14 @@ if (! $response) { currently are " . $response['players'] . " players online of a maximum of " . $response['max_players'] . ". The motd of the server is '" . $response['description'] . "'. The server has a ping of " . $response['ping'] . " milliseconds."; + if($response['player_list']) + echo 'Connected players:
'; + { + foreach($response['player_list'] as $player) + { + echo $player . '
'; + } + } } ``` If the server is offline MinecraftServerStatus::query returns false else it returns an array which contains the server informations. From 0e598e9a75bbbe3008078258e51aaf68804996d3 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 16:04:04 +0200 Subject: [PATCH 7/9] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 58b3070..76144ec 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,8 @@ if (! $response) { currently are " . $response['players'] . " players online of a maximum of " . $response['max_players'] . ". The motd of the server is '" . $response['description'] . "'. The server has a ping of " . $response['ping'] . " milliseconds."; + + if($response['player_list']) echo 'Connected players:
'; { From f266aafde831b8b80dab652f6a3ce80682d3c75f Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 16:26:44 +0200 Subject: [PATCH 8/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6aed43b..7686d57 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "server", "status" ], - "license" : "proprietary", + "license" : "BSD", "repositories" : [{ "type" : "vcs", "url" : "https://github.com/ok236449/PHP-Minecraft-Server-Status-Query.git" From 683959b31b4a68de7ed3143e14967f91726407c5 Mon Sep 17 00:00:00 2001 From: ok236449 <89067167+ok236449@users.noreply.github.com> Date: Sun, 1 May 2022 16:28:15 +0200 Subject: [PATCH 9/9] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7686d57..6aed43b 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "server", "status" ], - "license" : "BSD", + "license" : "proprietary", "repositories" : [{ "type" : "vcs", "url" : "https://github.com/ok236449/PHP-Minecraft-Server-Status-Query.git"