13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
22 public const NETWORK_ID = ProtocolInfo::PLAYER_ENCHANT_OPTIONS_PACKET;
25 private array $options;
31 public static function create(array $options) : self{
33 $result->options = $options;
40 public function getOptions() : array{ return $this->options; }
45 $this->options[] = EnchantOption::read($in);
50 $out->putUnsignedVarInt(count($this->options));
51 foreach($this->options as $option){
57 return $handler->handlePlayerEnchantOptions($this);
encodePayload(PacketSerializer $out)
handle(PacketHandlerInterface $handler)
static create(array $options)
decodePayload(PacketSerializer $in)