22declare(strict_types=1);
29use
function array_unshift;
47 private array $resourcePacks,
48 private array $encryptionKeys,
49 private bool $mustAccept
53 return $this->playerInfo;
61 array_unshift($this->resourcePacks, $entry);
62 if($encryptionKey !==
null){
63 $this->encryptionKeys[$entry->
getPackId()] = $encryptionKey;
79 $this->resourcePacks = $resourcePacks;
80 $this->encryptionKeys = $encryptionKeys;
88 return $this->resourcePacks;
96 return $this->encryptionKeys;
99 public function setMustAccept(
bool $mustAccept) : void{
100 $this->mustAccept = $mustAccept;
103 public function mustAccept() : bool{
104 return $this->mustAccept;
setResourcePacks(array $resourcePacks, array $encryptionKeys)
__construct(private readonly PlayerInfo $playerInfo, private array $resourcePacks, private array $encryptionKeys, private bool $mustAccept)
addResourcePack(ResourcePack $entry, ?string $encryptionKey=null)