Skip to content

Commit

Permalink
Fix version_manifest_v2.json versions extraction
Browse files Browse the repository at this point in the history
The versions from https://launchermeta.mojang.com/mc/game/version_manifest_v2.js are now under {"versions":[]} field
  • Loading branch information
EverNife authored Sep 14, 2024
1 parent 80d93ca commit badc726
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Libraries/MinecraftUtils.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function fetchVersions()
// The format is ['1.12.2' => ['version' => '1.12.2'], ...]
$versions = [];

foreach ($json as $mojangVersion) {
foreach ($json['versions'] as $mojangVersion) {
if ($mojangVersion['type'] !== 'release') {
continue;
}
Expand Down

0 comments on commit badc726

Please sign in to comment.