use pocketmine\network\mcpe\NetworkSession; class ClientCacheStatusPacket extends DataPacket/* implements ServerboundPacket*/{ public const NETWORK_ID = ProtocolInfo::CLIENT_CACHE_STATUS_PACKET; /** @var bool */ private $enabled; public static function create(bool $enabled) : self{ $result = new self; $result->enabled = $enabled; return $result; } /** * @return bool */ public function isEnabled() : bool{ return $this->enabled; } protected function decodePayload() : void{ $this->enabled = $this->getBool(); } protected function encodePayload() : void{ $this->putBool($this->enabled); } public function handle(NetworkSession $handler) : bool{ return $handler->handleClientCacheStatus($this); } }