PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
getPackChunk (int $start, int $length) | |
getPackId () | |
getPackName () | |
getPackSize () | |
getPackVersion () | |
getSha256 () | |
Definition at line 26 of file ResourcePack.php.
pocketmine\resourcepacks\ResourcePack::getPackChunk | ( | int | $start, |
int | $length ) |
Returns a chunk of the resource pack zip as a byte-array for sending to clients.
Note that resource packs must always be in zip archive format for sending. A folder resource loader may need to perform on-the-fly compression for this purpose.
int | $start | Offset to start reading the chunk from |
int | $length | Maximum length of data to return. |
@phpstan-param positive-int $length
InvalidArgumentException if the chunk does not exist
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
pocketmine\resourcepacks\ResourcePack::getPackId | ( | ) |
Returns the pack's UUID as a human-readable string
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
Referenced by pocketmine\event\player\PlayerResourcePackOfferEvent\addResourcePack().
pocketmine\resourcepacks\ResourcePack::getPackName | ( | ) |
Returns the human-readable name of the resource pack
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
pocketmine\resourcepacks\ResourcePack::getPackSize | ( | ) |
Returns the size of the pack on disk in bytes.
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
pocketmine\resourcepacks\ResourcePack::getPackVersion | ( | ) |
Returns a version number for the pack in the format major.minor.patch
Implemented in pocketmine\resourcepacks\ZippedResourcePack.
pocketmine\resourcepacks\ResourcePack::getSha256 | ( | ) |
Returns the raw SHA256 sum of the compressed resource pack zip. This is used by clients to validate pack downloads.