add ResourcePack->getPath(), close #1559

This commit is contained in:
Dylan K. Taylor 2017-11-20 13:24:30 +00:00
parent 32714d4564
commit a39c9e8c8e
2 changed files with 10 additions and 0 deletions

View File

@ -27,6 +27,12 @@ namespace pocketmine\resourcepacks;
interface ResourcePack{ interface ResourcePack{
/**
* Returns the path to the resource pack. This might be a file or a directory, depending on the type of pack.
* @return string
*/
public function getPath() : string;
/** /**
* Returns the human-readable name of the resource pack * Returns the human-readable name of the resource pack
* @return string * @return string

View File

@ -99,6 +99,10 @@ class ZippedResourcePack implements ResourcePack{
fclose($this->fileResource); fclose($this->fileResource);
} }
public function getPath() : string{
return $this->path;
}
public function getPackName() : string{ public function getPackName() : string{
return $this->manifest->header->name; return $this->manifest->header->name;
} }