PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
Loading...
Searching...
No Matches
pocketmine\resourcepacks\ResourcePackManager Class Reference
+ Collaboration diagram for pocketmine\resourcepacks\ResourcePackManager:

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)
 

Detailed Description

Definition at line 46 of file ResourcePackManager.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\resourcepacks\ResourcePackManager::__construct ( string $path,
\Logger $logger )
Parameters
string$pathPath to resource-packs directory.

Definition at line 65 of file ResourcePackManager.php.

References Logger\critical(), Logger\debug(), and Logger\info().

+ Here is the call graph for this function:

Member Function Documentation

◆ getPackById()

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.

◆ getPackEncryptionKey()

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.

◆ getPackIdList()

pocketmine\resourcepacks\ResourcePackManager::getPackIdList ( )

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

Returns
string[]

Definition at line 207 of file ResourcePackManager.php.

◆ getPath()

pocketmine\resourcepacks\ResourcePackManager::getPath ( )

Returns the directory which resource packs are loaded from.

Definition at line 147 of file ResourcePackManager.php.

◆ getResourceStack()

pocketmine\resourcepacks\ResourcePackManager::getResourceStack ( )

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

Returns
ResourcePack[]

Definition at line 169 of file ResourcePackManager.php.

◆ resourcePacksRequired()

pocketmine\resourcepacks\ResourcePackManager::resourcePacksRequired ( )

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

Definition at line 154 of file ResourcePackManager.php.

◆ setPackEncryptionKey()

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.

◆ setResourcePacksRequired()

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.

◆ setResourceStack()

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.

Parameters
ResourcePack[]$resourceStack@phpstan-param list<ResourcePack> $resourceStack

Definition at line 181 of file ResourcePackManager.php.


The documentation for this class was generated from the following file: