PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
|
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 46 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::__construct | ( | string | $path, |
\Logger | $logger ) |
string | $path | Path to resource-packs directory. |
Definition at line 65 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 199 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 214 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getPackIdList | ( | ) |
Returns an array of pack IDs for packs currently in use.
Definition at line 207 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getPath | ( | ) |
Returns the directory which resource packs are loaded from.
Definition at line 147 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::getResourceStack | ( | ) |
Returns an array of resource packs in use, sorted in order of priority.
Definition at line 169 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::resourcePacksRequired | ( | ) |
Returns whether players must accept resource packs in order to join.
Definition at line 154 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 222 of file ResourcePackManager.php.
pocketmine\resourcepacks\ResourcePackManager::setResourcePacksRequired | ( | bool | $value | ) |
Sets whether players must accept resource packs in order to join.
Definition at line 161 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 181 of file ResourcePackManager.php.