mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 12:18:46 +00:00
add ResourcePack->getPath(), close #1559
This commit is contained in:
parent
32714d4564
commit
a39c9e8c8e
@ -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
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user