use pocketmine\network\mcpe\NetworkSession; class SetLastHurtByPacket extends DataPacket{ public const NETWORK_ID = ProtocolInfo::SET_LAST_HURT_BY_PACKET; /** @var int */ public $entityTypeId; protected function decodePayload(){ $this->entityTypeId = $this->getVarInt(); } protected function encodePayload(){ $this->putVarInt($this->entityTypeId); } public function handle(NetworkSession $session) : bool{ return $session->handleSetLastHurtBy($this); } }