Skip to content

ResourcePackManager ​

class · pocketmine\resourcepacks\ResourcePackManager · source

Methods ​

__construct() ​

php
public function __construct(string $path, \Logger $logger)

getPackById() ​

php
public function getPackById(string $id) : ?\pocketmine\resourcepacks\ResourcePack

Returns the resource pack matching the specified UUID string, or null if the ID was not recognized.

getPackEncryptionKey() ​

php
public function getPackEncryptionKey(string $id) : ?string

Returns the key with which the pack was encrypted, or null if the pack has no key.

getPackIdList() ​

php
public function getPackIdList() : array

Returns an array of pack IDs for packs currently in use.

getPath() ​

php
public function getPath() : string

Returns the directory which resource packs are loaded from.

getResourceStack() ​

php
public function getResourceStack() : array

Returns an array of resource packs in use, sorted in order of priority.

resourcePacksRequired() ​

php
public function resourcePacksRequired() : bool

Returns whether players must accept resource packs in order to join.

setPackEncryptionKey() ​

php
public function setPackEncryptionKey(string $id, ?string $key) : void

Sets 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() ​

php
public function setResourcePacksRequired(bool $value) : void

Sets whether players must accept resource packs in order to join.

setResourceStack() ​

php
public function setResourceStack(array $resourceStack) : void

Sets 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.

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