Our company has been using Jenkins for a while now and have been wanting to improve the flexibility of script-based functions to support setting the status of the build to something other than SUCCESS or FAILED. So far, we've worked around the issue using cli commands, but I don't see why this couldn't be an option for plugin developers to setup using an inherited method.
Maybe a solution : https://github.com/jenkinsci/jenkins/pull/1079