Support 1.6 - 1.6.3

This commit is contained in:
2025-08-28 10:23:12 -07:00
parent 331d7e99a0
commit 8f1f6098e3
4 changed files with 12 additions and 5 deletions

View File

@@ -50,6 +50,11 @@ foreach ($rows as $row) {
];
}
echo encrypt(json_encode(["messages" => array_reverse($mapped), "customIcons" => $icons]));
if (getClientVersion() == "1.6") {
echo encrypt(json_encode($mapped));
} else {
echo encrypt(json_encode(["messages" => array_reverse($mapped), "customIcons" => $icons]));
}
$conn->close();

View File

@@ -72,8 +72,7 @@ foreach ($rows as $row) {
usort($mapped, fn($a,$b) => $b['value'] <=> $a['value']);
$limited = array_slice($mapped, 0, 500);
$clientVersion = $_SERVER['HTTP_CLIENTVERSION'] ?? "0";
if ($_SERVER['HTTP_REQUESTER'] == 'BerryDashLauncher') {
if (getClientVersion() == "1.6" || (getClientVersion() == "1.6.1" && $request_type == "1")) {
echo encrypt(json_encode($limited));
} else {
echo encrypt(json_encode(["entries" => $limited, "customIcons" => $icons]));