Skip to content

Commit 6794e1d

Browse files
authored
Code style consistency and modify $playerList
1 parent 8029a21 commit 6794e1d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

json.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,16 @@
4646
} else {
4747
$platform = $Info['GameName'];
4848
}
49-
50-
$playerList = array( );
51-
if ( !empty( $InfoPing['players']['sample'] ) ) {
52-
$playerList = $InfoPing['players']['sample'];
53-
}
54-
55-
$pluginList = array( );
56-
if ( !empty( $Info['Plugins'] ) ) {
57-
$pluginList = $Info['Plugins'];
58-
}
49+
50+
$playerList = array();
51+
if (!empty($Query->GetPlayers())) {
52+
$playerList = $Query->GetPlayers();
53+
}
54+
55+
$pluginList = array();
56+
if (!empty($Info['Plugins'])) {
57+
$pluginList = $Info['Plugins'];
58+
}
5959

6060
$json = array(
6161
'status' => 'Online',
@@ -86,7 +86,7 @@
8686
'processed' => $Timer
8787
)
8888
);
89-
} else if ($InfoPing !== false){
89+
} else if ($InfoPing !== false) {
9090
$version = explode(" ", $InfoPing['version']['name'], 2);
9191
$hostNameHtml = str_replace("§k", "", $InfoPing['description']);
9292
$hostNameHtml = str_replace("§l", "", $hostNameHtml);

0 commit comments

Comments
 (0)