PocketMine-MP 5.23.3 git-f7687af337d001ddbcc47b8e773f014a33faa662
|
Public Member Functions | |
__construct (private readonly PlayerInfo $playerInfo, private array $resourcePacks, private array $encryptionKeys, private bool $mustAccept) | |
addResourcePack (ResourcePack $entry, ?string $encryptionKey=null) | |
call () | |
getEncryptionKeys () | |
getEventName () | |
getPlayerInfo () | |
getResourcePacks () | |
mustAccept () | |
setMustAccept (bool $mustAccept) | |
setResourcePacks (array $resourcePacks, array $encryptionKeys) | |
Static Public Member Functions | |
static | hasHandlers () |
Protected Attributes | |
string | $eventName = null |
Called after a player authenticates and is being offered resource packs to download.
This event should be used to decide which resource packs to offer the player and whether to require the player to download the packs before they can join the server.
Definition at line 37 of file PlayerResourcePackOfferEvent.php.
pocketmine\event\player\PlayerResourcePackOfferEvent::__construct | ( | private readonly PlayerInfo | $playerInfo, |
private array | $resourcePacks, | ||
private array | $encryptionKeys, | ||
private bool | $mustAccept ) |
ResourcePack[] | $resourcePacks | |
string[] | $encryptionKeys | pack UUID => key, leave unset for any packs that are not encrypted |
@phpstan-param list<ResourcePack> $resourcePacks @phpstan-param array<string, string> $encryptionKeys
Definition at line 45 of file PlayerResourcePackOfferEvent.php.
pocketmine\event\player\PlayerResourcePackOfferEvent::addResourcePack | ( | ResourcePack | $entry, |
?string | $encryptionKey = null ) |
Adds a resource pack to the top of the stack. The resources in this pack will be applied over the top of any existing packs.
Definition at line 60 of file PlayerResourcePackOfferEvent.php.
References pocketmine\resourcepacks\ResourcePack\getPackId().
|
inherited |
pocketmine\event\player\PlayerResourcePackOfferEvent::getEncryptionKeys | ( | ) |
Definition at line 95 of file PlayerResourcePackOfferEvent.php.
pocketmine\event\player\PlayerResourcePackOfferEvent::getPlayerInfo | ( | ) |
Definition at line 52 of file PlayerResourcePackOfferEvent.php.
pocketmine\event\player\PlayerResourcePackOfferEvent::getResourcePacks | ( | ) |
Definition at line 87 of file PlayerResourcePackOfferEvent.php.
|
staticinherited |
pocketmine\event\player\PlayerResourcePackOfferEvent::mustAccept | ( | ) |
Definition at line 103 of file PlayerResourcePackOfferEvent.php.
pocketmine\event\player\PlayerResourcePackOfferEvent::setMustAccept | ( | bool | $mustAccept | ) |
Definition at line 99 of file PlayerResourcePackOfferEvent.php.
pocketmine\event\player\PlayerResourcePackOfferEvent::setResourcePacks | ( | array | $resourcePacks, |
array | $encryptionKeys ) |
Sets the resource packs to offer. Packs are applied from the highest key to the lowest, with each pack overwriting any resources from the previous pack. This means that the pack at index 0 gets the final say on which resources are used.
ResourcePack[] | $resourcePacks | |
string[] | $encryptionKeys | pack UUID => key, leave unset for any packs that are not encrypted |
@phpstan-param list<ResourcePack> $resourcePacks @phpstan-param array<string, string> $encryptionKeys
Definition at line 78 of file PlayerResourcePackOfferEvent.php.
|
protectedinherited |