How can I limit my web-panel to Servicedesk projects?

I’ve been looking at a way to limit my web-panel to Servicedesk projects. I’ve found https://developer.atlassian.com/cloud/jira/platform/conditions/ which lists the project_type condition but I don’t see it in the conditions documentation here: https://docs.atlassian.com/DAC/javadoc/jira/reference/com/atlassian/jira/plugin/webfragment/conditions/package-summary.html.

How can I apply the project_type condition to my web-panel?

For Server,
You’ll need to write your own Condition class (extend https://docs.atlassian.com/software/jira/docs/api/7.6.0/com/atlassian/jira/plugin/webfragment/conditions/AbstractWebCondition.html ) and then on the project object or on the issue object (depending on the location that you’re doing things - one of those should exist on the map) - you can check the project’s getProjectTypeKey() and then show things based on that.

Thank you I manged to figure it out! For anyone curious what it looks like finished

My new condition

public class ServicedeskCondition extends AbstractWebCondition {
    @Override
    public boolean shouldDisplay(ApplicationUser user, JiraHelper helper){
        Issue currentIssue = (Issue) helper.getContextParams().get("issue");
        Project currentProject = currentIssue.getProjectObject();
        return currentProject.getProjectTypeKey().getKey().equals("service_desk");
    }
}