Skip to content

Commit

Permalink
PMMP 4.0: Fix potential update check crash
Browse files Browse the repository at this point in the history
  • Loading branch information
DaPigGuy committed Jul 23, 2020
1 parent ec09d1b commit b2a525e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DaPigGuy/PiggyFactions/tasks/CheckUpdatesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function onCompletion(): void

$data = json_decode($results[0], true);
if (version_compare($plugin->getDescription()->getVersion(), $data[0]["version"]) === -1) {
if (ApiVersion::isCompatible($plugin->getServer()->getApiVersion(), $data[0]["api"][0]["from"])) {
if (ApiVersion::isCompatible($plugin->getServer()->getApiVersion(), $data[0]["api"][0])) {
PiggyFactions::getInstance()->getLogger()->info("PiggyFactions v" . $data[0]["version"] . " is available for download at " . $data[0]["artifact_url"] . "/PiggyFactions.phar");
}
}
Expand Down

0 comments on commit b2a525e

Please sign in to comment.