13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::GUI_DATA_PICK_ITEM_PACKET;
22 public string $itemDescription;
23 public string $itemEffects;
24 public int $hotbarSlot;
29 public static function create(
string $itemDescription,
string $itemEffects,
int $hotbarSlot) : self{
31 $result->itemDescription = $itemDescription;
32 $result->itemEffects = $itemEffects;
33 $result->hotbarSlot = $hotbarSlot;
38 $this->itemDescription = $in->getString();
40 $this->hotbarSlot = $in->
getLInt();
44 $out->putString($this->itemDescription);
45 $out->putString($this->itemEffects);
46 $out->putLInt($this->hotbarSlot);
50 return $handler->handleGuiDataPickItem($this);
handle(PacketHandlerInterface $handler)
decodePayload(PacketSerializer $in)
encodePayload(PacketSerializer $out)
static create(string $itemDescription, string $itemEffects, int $hotbarSlot)