ResourcePackManager
Methods
__construct()
public function __construct(string $path, \Logger $logger)getPackById()
public function getPackById(string $id) : ?\pocketmine\resourcepacks\ResourcePackReturns the resource pack matching the specified UUID string, or null if the ID was not recognized.
getPackEncryptionKey()
public function getPackEncryptionKey(string $id) : ?stringReturns the key with which the pack was encrypted, or null if the pack has no key.
getPackIdList()
public function getPackIdList() : arrayReturns an array of pack IDs for packs currently in use.
getPath()
public function getPath() : stringReturns the directory which resource packs are loaded from.
getResourceStack()
public function getResourceStack() : arrayReturns an array of resource packs in use, sorted in order of priority.
resourcePacksRequired()
public function resourcePacksRequired() : boolReturns whether players must accept resource packs in order to join.
setPackEncryptionKey()
public function setPackEncryptionKey(string $id, ?string $key) : voidSets the encryption key to use for decrypting the specified resource pack. The pack will NOT be decrypted by PocketMine-MP; the key is simply passed to the client to allow it to decrypt the pack after downloading it.
setResourcePacksRequired()
public function setResourcePacksRequired(bool $value) : voidSets whether players must accept resource packs in order to join.
setResourceStack()
public function setResourceStack(array $resourceStack) : voidSets the resource packs to use. Packs earliest in the list will appear at the top of the stack (maximum priority), and later ones will appear below (lower priority), in the same manner as the Bedrock resource packs screen in-game.
