PlayerResourcePackOfferEvent
Extends Event
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.
Methods
__construct()
php
public function __construct(\pocketmine\player\PlayerInfo $playerInfo, array $resourcePacks, array $encryptionKeys, bool $mustAccept)addResourcePack()
php
public function addResourcePack(\pocketmine\resourcepacks\ResourcePack $entry, ?string $encryptionKey = null) : voidAdds a resource pack to the top of the stack. The resources in this pack will be applied over the top of any existing packs.
getEncryptionKeys()
php
public function getEncryptionKeys() : arraygetPlayerInfo()
php
public function getPlayerInfo() : \pocketmine\player\PlayerInfogetResourcePacks()
php
public function getResourcePacks() : arraymustAccept()
php
public function mustAccept() : boolsetMustAccept()
php
public function setMustAccept(bool $mustAccept) : voidsetResourcePacks()
php
public function setResourcePacks(array $resourcePacks, array $encryptionKeys) : voidSets 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.
