Changed method to require a plugin reference.