mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-23 03:16:35 +00:00
ZippedResourcePack: Make manifest parse errors less useless
This commit is contained in:
parent
eccc249009
commit
1ef6f5d166
@ -86,8 +86,11 @@ class ZippedResourcePack implements ResourcePack{
|
|||||||
$archive->close();
|
$archive->close();
|
||||||
|
|
||||||
$manifest = json_decode($manifestData);
|
$manifest = json_decode($manifestData);
|
||||||
if($manifest === null or !self::verifyManifest($manifest)){
|
if($manifest === null){
|
||||||
throw new ResourcePackException("manifest.json is invalid or incomplete");
|
throw new ResourcePackException("Failed to parse manifest.json: " . json_last_error_msg());
|
||||||
|
}
|
||||||
|
if(!self::verifyManifest($manifest)){
|
||||||
|
throw new ResourcePackException("manifest.json is missing required fields");
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->manifest = $manifest;
|
$this->manifest = $manifest;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user