Bitbucket PR trigger in pipeline script

Hi,
I’d like to trigger my pipeline after opening and updating a pull request in bitbucket. I use pipeline scripts.

If I do the following, I get an error:

pipeline {
  triggers {
    bitBucketTrigger([
      pullRequestServerCreatedAction(allowedBranches: 'origin/(.*)', isToApprove: true),
      pullRequestServerUpdatedAction(allowedBranches: 'origin/(.*)', isToApprove: true)
    ])
  }
  stages {
    ...
  }
}

The error:

org.jenkinsci.plugins.workflow.actions.ErrorAction$ErrorId: ae121c1a-49a4-4ced-b330-a6e7130dd5fb
java.lang.NoSuchMethodError: No such DSL method 'pullRequestServerCreatedAction' found among steps

How can I use multiple triggers?

Jenkins setup: 2.462.1
Plugin bitbucket-push-and-pull-request version: 3.0.2