Add ScalaPlugin with a functional hook()