PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
__construct (string $path, \Logger $logger) | |
getPackById (string $id) | |
getPackEncryptionKey (string $id) | |
getPackIdList () | |
getPath () | |
getResourceStack () | |
resourcePacksRequired () | |
setPackEncryptionKey (string $id, ?string $key) | |
setResourcePacksRequired (bool $value) | |
setResourceStack (array $resourceStack) | |
Definition at line 45 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::__construct | ( | string | $path, |
\Logger | $logger ) |
string | $path | Path to resource-packs directory. |
Definition at line 64 of file ResourcePackManager.php.
References Logger\critical(), Logger\debug(), and Logger\info().
pocketmine\resourcepacks\ResourcePackManager::getPackById | ( | string | $id | ) |
Returns the resource pack matching the specified UUID string, or null if the ID was not recognized.
Definition at line 198 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getPackEncryptionKey | ( | string | $id | ) |
Returns the key with which the pack was encrypted, or null if the pack has no key.
Definition at line 213 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getPackIdList | ( | ) |
Returns an array of pack IDs for packs currently in use.
Definition at line 206 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getPath | ( | ) |
Returns the directory which resource packs are loaded from.
Definition at line 146 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getResourceStack | ( | ) |
Returns an array of resource packs in use, sorted in order of priority.
Definition at line 168 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::resourcePacksRequired | ( | ) |
Returns whether players must accept resource packs in order to join.
Definition at line 153 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::setPackEncryptionKey | ( | string | $id, |
?string | $key ) |
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.
Definition at line 221 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::setResourcePacksRequired | ( | bool | $value | ) |
Sets whether players must accept resource packs in order to join.
Definition at line 160 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::setResourceStack | ( | array | $resourceStack | ) |
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.
ResourcePack[] | $resourceStack | @phpstan-param list<ResourcePack> $resourceStack |
Definition at line 180 of file ResourcePackManager.php.