Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)
The returned object can implement either MissileSpecAPI or ProjectileSpecAPI. The return type of getProjectileSpec() is "Object" so it can return anything. Worth noting that both MissileSpecAPI and ProjectileSpecAPI are interfaces, so what getProjectileSpec() actually will be some other under-the-hood class that implements one of those two interfaces. You can use the "instanceof" operator to check which one you've got.