code: public void blockDeployManagedDeploymentsWhenNeeded(@Observes EventContext<DeployManagedDeployments> eventContext) {
          if (!extensionEnabled()) {
              eventContext.proceed();
          }
          else if (deployDeployments) {
              deployDeployments = false;
              debug("NOT Blocking DeployManagedDeployments event {0}", eventContext.getEvent().toString());
              eventContext.proceed();
          } else {
              // Do nothing with event.
              debug("Blocking DeployManagedDeployments event {0}", eventContext.getEvent().toString());
          }
      }
docs: Method ignoring DeployManagedDeployments events if already deployed.
  
  @param eventContext Event to check