13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
18use pocketmine\network\mcpe\protocol\types\ShowStoreOfferRedirectType;
21 public const NETWORK_ID = ProtocolInfo::SHOW_STORE_OFFER_PACKET;
23 public string $offerId;
24 public ShowStoreOfferRedirectType $redirectType;
29 public static function create(
string $offerId, ShowStoreOfferRedirectType $redirectType) : self{
31 $result->offerId = $offerId;
32 $result->redirectType = $redirectType;
37 $this->offerId = $in->getString();
38 $this->redirectType = ShowStoreOfferRedirectType::fromPacket($in->
getByte());
42 $out->putString($this->offerId);
43 $out->putByte($this->redirectType->value);
47 return $handler->handleShowStoreOffer($this);
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
handle(PacketHandlerInterface $handler)
static create(string $offerId, ShowStoreOfferRedirectType $redirectType)