Your sector generation code should have something like this:
import exerelin.campaign.SectorManager;
//[...]
public class MyModPlugin {
@Override
public void onNewGame()
{
boolean haveNexerelin = Global.getSettings().getModManager().isModEnabled("nexerelin");
if (!haveNexerelin || SectorManager.getCorvusMode())
new MySectorGen().generate(Global.getSector());
}
//[...]
}
If you don't want to use Nexerelin as a library, it may be possible (in principle) to check for Corvus mode at the new game stage, simply by checking if Corvus (or some other vanilla system/planet) exists. I haven't tested this yet however.
Be careful with any code that targets a specific planet or star system by name! Make sure you disable it in non-Corvus mode, and don't assume a given planet will always belong to its original owner.