Make resource-pack error messages a little clearer

This commit is contained in:
Dylan K. Taylor 2017-07-13 10:55:42 +01:00
parent 6af87b7b30
commit 6b773dc04d

View File

@ -76,7 +76,11 @@ class ZippedResourcePack implements ResourcePack{
}
if(($manifestData = $archive->getFromName("manifest.json")) === false){
throw new \InvalidStateException("Could not load resource pack from $zipPath: manifest.json not found");
if($archive->locateName("pack_manifest.json") !== false){
throw new \InvalidStateException("Could not load resource pack from $zipPath: unsupported old pack format");
}else{
throw new \InvalidStateException("Could not load resource pack from $zipPath: manifest.json not found in the archive root");
}
}
$archive->close();