Skip to content

ResourcePack ​

interface · pocketmine\resourcepacks\ResourcePack · source

Methods ​

getPackChunk() ​

php
public function getPackChunk(int $start, int $length) : string

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.

getPackId() ​

php
public function getPackId() : string

Returns the pack's UUID as a human-readable string

getPackName() ​

php
public function getPackName() : string

Returns the human-readable name of the resource pack

getPackSize() ​

php
public function getPackSize() : int

Returns the size of the pack on disk in bytes.

getPackVersion() ​

php
public function getPackVersion() : string

Returns a version number for the pack in the format major.minor.patch

getSha256() ​

php
public function getSha256() : string

Returns the raw SHA256 sum of the compressed resource pack zip. This is used by clients to validate pack downloads.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.