Yeah, I think you got the right idea.
You're also going to run into a bit of trouble where the plugin from the api.zip won't compile. The game uses Janino (a 3rd party Java compiler) to compile stuff on startup, but it doesn't support some convenient language features. The stuff in the api.zip is precompiled and shipped as .class files inside starfarer.api.jar, so isn't compiled by Janino on startup (not doing which, incidentally, speeds up the startup time good bit.)
The main features that it doesn't support are:
1) Generics
2) The use of enums in switch statements
As far as I can see, the OrbitalStationInteractionDialogPluginImpl in api.zip does not use generics. But it does use an enum in a switch statement, so you'll have to change that to a if/else if/else if/etc to get it to compile on startup.
For example, in optionSelected(), it has:
switch (option) {
case INIT:
// do stuff
break;
case TRADE_CARGO:
// do stuff
break;
And you'd want to change that to something like:
if (option == OptionId.INIT) {
// do stuff
} else if (option == OptionId.TRADE_CARGO) {
// do stuff
}
Also, you may want to implement your plugin as a separate class, in another file, rather than an anonymous class inlined in the method. Just for the sake of convenience/sanity.
Edit: I'm assuming some of this won't quite make sense but hoping that it's enough to look stuff up off of and make it make sense. Feel free to ask followup questions, though - I'll try to get to 'em. In between all the bugfixing. Or maybe LazyWizard will come in to save the day, as he generally does