use pocketmine\network\mcpe\NetworkSession; class ContainerClosePacket extends DataPacket{ const NETWORK_ID = ProtocolInfo::CONTAINER_CLOSE_PACKET; /** @var int */ public $windowId; protected function decodePayload(){ $this->windowId = $this->getByte(); } protected function encodePayload(){ $this->putByte($this->windowId); } public function handle(NetworkSession $session) : bool{ return $session->handleContainerClose($this); } }