Looking at the code, you are correct that the modResource class's duplicate() method doesn't invoke that event.
It would be a good feature request to make sure that event is invoked in this process. (I think it has already been submitted -- maybe by me).
As a workaround, you'd have to put your own invokeEvent() code in the method. The method is recursive, so it would only have to go in one place. I'd put it here:
if (!$newResource->save()) {
return $this->xpdo->lexicon('resource_err_duplicate');
} else {
$this->xpdo->invokeEvent('OnResourceDuplicate', array(
'newResource' => &$newResource);
));
}
The new resource object would be available in your plugin as $newResource and you could get any of its fields with $newResource->get('fieldname'), you may or may not be able to get the id this way.
[ed. note: BobRay last edited this post 12 years, 2 months ago.]